[quagga-dev 3903] what platform requires AF_UNSPEC netmask?

David Young dyoung at pobox.com
Sun Dec 25 04:30:48 GMT 2005

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;
             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.  I tested on NetBSDk,
and it works.  Sounds like Solaris requires an AF_INET6
netmask for IPv6---see the discussion back in November 2004,
this would actually fix a bug.

Will other platforms break?


David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933

More information about the Quagga-dev mailing list