On Tue, Jun 06, 2017 at 03:36:12PM +0200, Martin Pieuchot wrote:
> +#define SALEN(sa)    (*(u_char *)sa)

Put () around macro arguments.
#define SALEN(sa)       (*(u_char *)(sa))

> -int
> +static int
>  rn_refines(void *m_arg, void *n_arg)

> -int
> +static int
>  rn_inithead0(struct radix_node_head *rnh, int offset)

Could you keep these kernel funtions global for debugging?

> @@ -414,8 +422,9 @@ rn_addmask(void *n_arg, int search, int 
>       static int last_zeroed = 0;
> +     char addmask_key[KEYLEN_LIMIT];

The static variable last_zeroed does not look MP safe.  If I get
this code correctly it is only an optimization to avoid multiple
zeroing in addmask_key.  This does not work anyway with addmask_key
on the stack.

>       *addmask_key = last_zeroed = mlen;

Should this be SALEN(addmask_key)?

bluhm

Reply via email to