ipsec_{crypto,integ}_alg_t are packed and smaller than u32. Callers are
using those enums so unformat functions should too instead of u32 to
not overflow the stack.
Type: fix
Change-Id: Ifc86366f1928ca6352f06f390a88ac64668289d5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
uword
unformat_ipsec_crypto_alg (unformat_input_t * input, va_list * args)
{
uword
unformat_ipsec_crypto_alg (unformat_input_t * input, va_list * args)
{
- u32 *r = va_arg (*args, u32 *);
+ ipsec_crypto_alg_t *r = va_arg (*args, ipsec_crypto_alg_t *);
if (0);
#define _(v,f,s) else if (unformat (input, s)) *r = IPSEC_CRYPTO_ALG_##f;
if (0);
#define _(v,f,s) else if (unformat (input, s)) *r = IPSEC_CRYPTO_ALG_##f;
uword
unformat_ipsec_integ_alg (unformat_input_t * input, va_list * args)
{
uword
unformat_ipsec_integ_alg (unformat_input_t * input, va_list * args)
{
- u32 *r = va_arg (*args, u32 *);
+ ipsec_integ_alg_t *r = va_arg (*args, ipsec_integ_alg_t *);
if (0);
#define _(v,f,s) else if (unformat (input, s)) *r = IPSEC_INTEG_ALG_##f;
if (0);
#define _(v,f,s) else if (unformat (input, s)) *r = IPSEC_INTEG_ALG_##f;