On Fri, Sep 02, 2016 at 16:56 +0200, Jan Klemkow wrote:
> Hi,
> 
> When a new IP address shows up on an interface, the function
> if_newaddr() save this IP address and its mask and boardcast address
> into a data structure.  If the corresponding IP mask or broad cast
> address is not set, their data fields in this structure are bzero()-ed.
> 
> But, the code wipes the mask field if the broadcast address is not set
> an leave the broadcast field untouched.
> 
> The diff below should fix this problem.
>

Yes, looks like a pasto to me.  OK mikeb

> bye,
> Jan
> 
> Index: kroute.c
> ===================================================================
> RCS file: /mount/openbsd/cvs/src/usr.sbin/snmpd/kroute.c,v
> retrieving revision 1.32
> diff -u -p -r1.32 kroute.c
> --- kroute.c  3 Nov 2015 07:48:03 -0000       1.32
> +++ kroute.c  2 Sep 2016 13:51:59 -0000
> @@ -1127,7 +1127,7 @@ if_newaddr(u_short if_index, struct sock
>       if (brd)
>               bcopy(brd, &ka->dstbrd.sa, brd->sa_len);
>       else
> -             bzero(&ka->mask, sizeof(ka->mask));
> +             bzero(&ka->dstbrd, sizeof(ka->dstbrd));
>  
>  }
> 

Reply via email to