tls: fifo size is u32
- unformat_memory_size() writes to a uword * - Limit cli input to u32 Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I453a5633e04f9ee6f2f1a843634f99063a81579b
This commit is contained in:

committed by
Florin Coras

parent
e3b70df824
commit
b1a81aa679
@ -892,6 +892,7 @@ static clib_error_t *
|
|||||||
tls_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
tls_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
||||||
{
|
{
|
||||||
tls_main_t *tm = &tls_main;
|
tls_main_t *tm = &tls_main;
|
||||||
|
uword tmp;
|
||||||
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
|
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
|
||||||
{
|
{
|
||||||
if (unformat (input, "use-test-cert-in-ca"))
|
if (unformat (input, "use-test-cert-in-ca"))
|
||||||
@ -901,9 +902,15 @@ tls_config_fn (vlib_main_t * vm, unformat_input_t * input)
|
|||||||
else if (unformat (input, "first-segment-size %U", unformat_memory_size,
|
else if (unformat (input, "first-segment-size %U", unformat_memory_size,
|
||||||
&tm->first_seg_size))
|
&tm->first_seg_size))
|
||||||
;
|
;
|
||||||
else if (unformat (input, "fifo-size %U", unformat_memory_size,
|
else if (unformat (input, "fifo-size %U", unformat_memory_size, &tmp))
|
||||||
&tm->fifo_size))
|
{
|
||||||
;
|
if (tmp >= 0x100000000ULL)
|
||||||
|
{
|
||||||
|
return clib_error_return
|
||||||
|
(0, "fifo-size %llu (0x%llx) too large", tmp, tmp);
|
||||||
|
}
|
||||||
|
tm->fifo_size = tmp;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return clib_error_return (0, "unknown input `%U'",
|
return clib_error_return (0, "unknown input `%U'",
|
||||||
format_unformat_error, input);
|
format_unformat_error, input);
|
||||||
|
Reference in New Issue
Block a user