Subject: Re: restoring sockaddr_dl size; introducing sockaddr_link
To: None <>
From: Greg Troxel <>
List: tech-net
Date: 08/23/2007 18:58:06
David Young <> writes:

> I have the Quagga sources right before me, and it looks as if Quagga
> embeds a sockaddr_dl in a wire-protocol packet.  In quagga/lib/zclient.c,
> zebra_interface_add_read(), I have found some sockaddr_dl abuse:
>   stream_get (&ifp->sdl, s, sizeof (ifp->sdl));
> #else
>   ifp->hw_addr_len = stream_getl (s);
>   if (ifp->hw_addr_len)
>     stream_get (ifp->hw_addr, s, ifp->hw_addr_len);
> #endif /* HAVE_SOCKADDR_DL */

That's abuse in a 'wire protocol', but that seems to be in the
zebra/routing-daemon interface that's a) on machine and b) semi private
within quagga.  It's not clear that changing the size will lead to
problems, assuming consistent compilation between zebra and e.g. ospfd.

Granted, this is gross on quagga's part, but I'm not sure it's a good
reason for workarounds.