[quagga-dev 7796] Re: IPv6 Multicast Hop Limit for OSPFv3

Mike Pontillo pontillo at gmail.com
Thu Feb 11 18:18:37 GMT 2010

On Thu, Feb 11, 2010 at 7:51 AM,  <paul at jakma.org> wrote:
> Would conditional on IPV6_MULTICAST_HOPS not work? Then its bound directly
> to the feature and there's least scope for it going wrong, or ...?

I actually don't like the #ifdef's at all, for a few reasons:

(1) If [some bizarre platform] defines socket options as an enum
rather than a list of #defines, the conditional will fail
(2) The current implementation returns 0 if both #ifdefs fail - which
means we would silently not set the ttl, which could be unintuitive
debug if it happens (side note: if someone passes in an incorrect
address family, it will silently fail; it might be good to add an
assert on this)
(3) If we take the above suggestion and make the conditional basde on
IPV6_MULTICAST_HOPS, if the user configures Quagga without IPv6
support, they will still get calls to these socket options compiled in
(if the #define exists on that platform)

So my question becomes: does Quagga really support platforms that
don't have these socket options? And if so, would it be better for
those platforms to throw compile errors, so someone can figure out how
to correctly implement that functionality on their platform?


More information about the Quagga-dev mailing list