On 04/02/14(Tue) 10:50, Martin Pieuchot wrote:
> Diff below removes an old comment about bsdi4 and make it clear that
> netmasks are not needed for routes to host.
> 
> ok?

Anybody?


> 
> Index: net/route.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/net/route.c,v
> retrieving revision 1.151
> diff -u -p -r1.151 route.c
> --- net/route.c       23 Jan 2014 10:16:30 -0000      1.151
> +++ net/route.c       4 Feb 2014 09:38:53 -0000
> @@ -1119,13 +1119,9 @@ rtinit(struct ifaddr *ifa, int cmd, int 
>       info.rti_info[RTAX_LABEL] =
>           rtlabel_id2sa(ifa->ifa_ifp->if_rtlabelid, &sa_rl);
>  
> -     /*
> -      * XXX here, it seems that we are assuming that ifa_netmask is NULL
> -      * for RTF_HOST.  bsdi4 passes NULL explicitly (via intermediate
> -      * variable) when RTF_HOST is 1.  still not sure if i can safely
> -      * change it to meet bsdi4 behavior.
> -      */
> -     info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask;
> +     if ((flags & RTF_HOST) == 0)
> +             info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask;
> +
>       error = rtrequest1(cmd, &info, RTP_CONNECTED, &nrt, rtableid);
>       if (cmd == RTM_DELETE) {
>               if (error == 0 && (rt = nrt) != NULL) {
> 

Reply via email to