[Quagga-bugs] [Bug 420] ospfd binds to wrong interfaces for multicast [FreeBSD 7]

bugzilla-daemon at allevil.dishone.st bugzilla-daemon at allevil.dishone.st
Wed Dec 12 20:56:19 GMT 2007


Please do not reply directly to this email. All additional  
comments should be made in the comments box of this bug  
report.  
  
http://bugzilla.quagga.net/show_bug.cgi?id=420  
  




------- Additional Comments From paul at dishone.st  2007-12-02 22:20 -------
Quagga already supports ip_mreqn, so the addition of it to FreeBSD will cause
Quagga to automatically stop using the old hack and start passing ifindex
explicitly with IP_MULTICAST_IF and IP_{ADD,DROP}_MEMBERSHIP. There's one fly in
the ointment though, which is that the current mreqn sockopt code isn't working
on FreeBSD, it doesn't result in ospfd joining to the correct interfaces. 

This /seems/ to be due to the fact that, at present in FreeBSD 7 beta, only
IP_MULTICAST_IF has been extended to support mreqn. IP_ADD/DROP_MEMBERSHIP still
assumes an old ip_mreq. Quagga however is passing an ip_mreqn, leaving the
address blank and passing ifindex. FreeBSD get 0 address and thus picks the
first capable interface instead, blithely unaware that an ifindex was passed in.

I presume it is intended to complete the mreqn support in short order in FreeBSD
(for this half-implementation breaks all multicast code that detects mreqn
presence at runtime and assumes therefore that it works for ADD/DROP_MEMBERSHIP
- which it does on Linux). 

If that presumption is correct, then this is a temporary bug in FreeBSD and
there's nothing to be changed in Quagga.


------- Additional Comments From i at levsha.org.ua  2007-12-12 20:56 -------
I think that this is bug in quagga: using ip_mreqn with IP_ADD/DROP_MEMBERSHIP
is linux specific hack: rfc 3678 allow only ip_mreq for IP_ADD/DROP_MEMBERSHIP.
At the same time qуагга only checks existence of structure ip_mreqn and think
that it can be used in IP_ADD/DROP_MEMBERSHIP.
I think that the correct solve of this problem is extending quagga configure to
check support of rfc 3678 (for example by checking existence
MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP constants) and then using
MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP instead of IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP
I have patch, which change sockopt.c to use MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP :
http://levsha.org.ua/sockopt.c.diff
But this patch is dirty: i think that patch break working in linux. If it is
interesting to community I shall try to realize it correctly: whit checking if
MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP is exists on configure time  
  
  
  
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Quagga-bugs mailing list