Re: Multicast problems [PATCH]

From: Johannes 5 Joemann <joemann_at_beefree.free.de>
Date: Sat, 8 Dec 2007 19:42:48 +0100
Hi!

On Tue, 03 Jul 2007 18:18:50 +0100 "Bruce M. Simpson"
<bms_at_FreeBSD.org> wrote:
> Bruce M. Simpson wrote:
> > I see now that Linux also supports ip_mreqn in its
> > IP_ADD_MEMBERSHIP path. I could potentially change the ASM API
> > ioctl paths (IP_ADD_MEMBERSHIP, IP_DEL_MEMBERSHIP) to detect and
> > support the ip_mreqn structure -- however -- I am loathe to do
> > this as it introduces another bunch of nested conditionals, as
> > the same code now has to support IP_ADD_SOURCE_MEMBERSHIP in
> > FreeBSD, which has the same structure size. It is also a
> > retrograde change.
> 
> I have attached a diff which emulates the Linux ip_mreqn kludge in
> the IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP paths; this includes
> the changes from the previous patch to workaround the non-existence
> of a default route on boot.

Thanx!

> I do not plan to commit it at the moment and have not tested it.

I tested your patch [1] on 7.0-BETA4 in order to make quagga's ospfd
functional again (over here it is multicasting on 5 interfaces (3 of
them point-to-point) - without the fix it only works on one
interface). Your patch solves the problem that if quagga discovers
ip_mreqn it also uses it for IP_ADD_MEMBERSHIP. Although you consider
your patch to in_mcast.c to be a retrograde kludge, it made my day:-)
For the convenience of other 7.0 users being lost in the Bermuda
Triangle between RFC1724, Linuxisms, and RFC3678 I've attached a
trivial modification of your patch, which makes it apply to the
RELENG_7 version 1.3.2.1 of src/sys/netinet/in_mcast.c.

> The right thing for applications to do is to use the RFC 3678 API

Meanwhile users of ospfd might survive even without your kernel patch
as outlined in [2]. I've attached that patch suggestion as a drop in
for ports/net/quagga/files. It worked for me with an unpatched (and
with a patched) 7.0-BETA4 kernel.

> if they need to join an interface by index, the legacy ASM API can
> only be relied upon if interfaces are assigned IPv4 addresses, and
> it breaks for point-to-point because of legacy BSD behaviour.

As long as FreeBSD supplies ip_mreqn in src/sys/netinet/in.h it seems
reasonable to support associated operations like IP_ADD_MEMBERSHIP.
It's certainly better to eradicate kludges and go with RFC3678, but
meanwhile I'd support your patch being committed to RELENG_7 in order
to make the ip_mreqn kludge smooth for production. (This is just a
naive comment from a humble user who's not in the multicast
business.-)

Thanx for your work!
Johannes

ps I've Cc:ed the quagga maintainer (I hope that's OK) as I consider
  it undesirable to have 7.0 shipped with a broken quagga-ospfd.
  Whether this should be fixed in the kernel or the port (or both:)
  is another question, but something should happen ...

[1] <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070703/d4f903b6/add_drop_mreqn-0001.bin>
[2] <http://bugzilla.quagga.net/show_bug.cgi?id=420#c8>

Received on Sat Dec 08 2007 - 18:15:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC