Mailing List Archive

ripngd multicast membership problems with down/up interfaces
I have a NetBSD system with a ppp link, over which I run ripng and
ospf. The PPP link is taken down once a day by the other side.
When the link comes back up, ripngd complains about joining the
multicast group and fails to start:

Jan 2 00:00:12 fred ripngd[3040]: can't setsockopt IPV6_JOIN_GROUP: Address already in use
Jan 2 00:00:12 fred ripngd[3040]: multicast join failed, interface ppp0 not running

This did not used to happen with zebra-pj, and ospf copes fine.

Looking in ripngd/ripng_interface.c, I see that the leave of the group
is only done if the interface is up.

While I suspect the v6 sockets api is not super clear (I haven't read
it carefully) about whether taking an interface down removes group
membership, it seems to be reasonable behavior to keep it.

It is probably also not clear if it is allowable to leave a group on
an interface that is down.

So perhaps ripng_multicast_join should check for EALREADY and not
complain, or ripngd should keep a 'joinedp' state variable and use it
to either leave the group just prior to joining when coming up, or
just no rejoin.

Vincent/Hasso: this seems to be part of the '6WIND ripng' patch - any
comments?
Re: ripngd multicast membership problems with down/up interfaces [ In reply to ]
[ripngd problems with mcast join on down/up transition]

I just committed changes to ignore EADDRINUSE when joining the group
(i.e., EADDRINUSE counts as success, but a message is logged).

See the ripngd ChangeLog for details.

--
Greg Troxel <gdt@ir.bbn.com>