[quagga-dev 3905] Re: what platform requires AF_UNSPEC netmask?

Greg Troxel gdt at ir.bbn.com
Thu Dec 29 15:49:34 GMT 2005


David Young <dyoung at pobox.com> writes:

> While adding RTM_CHANGE commands to Quagga 0.99.2, I noticed that
> Quagga sets IPv4 & IPv6 netmasks' family to AF_UNSPEC.  For example,
> in kernel_rtm_ipv4:
> 
>              masklen2ip (p->prefixlen, &sin_mask.sin_addr);
>              sin_mask.sin_family = AF_UNSPEC;
> #ifdef HAVE_SIN_LEN
>              sin_mask.sin_len = sin_masklen (sin_mask.sin_addr);
> #endif /* HAVE_SIN_LEN */
> 
> I propose to set the address family to match the destination,
> whether it is AF_INET or AF_INET6.

This looks like a bug; I'm not aware of any specs that call for
AF_UNSPEC in masks for real address families.  I'd say let's change it
- I'll look at your patch.


-- 

        Greg Troxel <gdt at ir.bbn.com>



More information about the Quagga-dev mailing list