summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorgdt <gdt>2004-01-04 01:02:55 +0000
committergdt <gdt>2004-01-04 01:02:55 +0000
commitddf1c26ca3cfd31ed11a40909bdadc6b823f0697 (patch)
treee536e458dc628c11a50a756020a2c99d2d6e2533 /ripngd
parentefc1e725778b55917962092ee9d0f735c9ef54dc (diff)
Really ripngd should either leave groups on down interfaces, or keep
track of on which interfaces joins have occurred. This is complicated by the possible lack of a clear behavior spec on whether interfaces keep their joined group lists across a down/up/down transition. (On NetBSD, they do.) 2004-01-03 Greg Troxel <gdt@ahi.ir.bbn.com> * ripng_interface.c (ripng_multicast_join): If IPV6_JOIN_GROUP returns EADDRINUSE, consider the join successful. This happens when an interface goes down and comes back because ripng_multicast_leave does not invoke the LEAVE_GROUP operation if the interface is down. Solves problem of ripng stopping working on an interface which goes down and then comes back up (on NetBSD).
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ChangeLog9
-rw-r--r--ripngd/ripng_interface.c12
2 files changed, 21 insertions, 0 deletions
diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog
index fa135103..f5a30787 100644
--- a/ripngd/ChangeLog
+++ b/ripngd/ChangeLog
@@ -1,3 +1,12 @@
+2004-01-03 Greg Troxel <gdt@ahi.ir.bbn.com>
+
+ * ripng_interface.c (ripng_multicast_join): If IPV6_JOIN_GROUP
+ returns EADDRINUSE, consider the join successful. This happens
+ when an interface goes down and comes back because
+ ripng_multicast_leave does not invoke the LEAVE_GROUP operation if
+ the interface is down. Solves problem of ripng stopping working
+ on an interface which goes down and then comes back up (on NetBSD).
+
2003-05-25 Hasso Tepper <hasso@estpak.ee>
* Revert ripng_ifrmap stuff because ripd uses it now as well.
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index b4299eb0..7437f70f 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -67,6 +67,18 @@ ripng_multicast_join (struct interface *ifp)
ret = setsockopt (ripng->sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
(char *) &mreq, sizeof (mreq));
+
+ if (ret < 0 && errno == EADDRINUSE)
+ {
+ /*
+ * Group is already joined. This occurs due to sloppy group
+ * management, in particular declining to leave the group on
+ * an interface that has just gone down.
+ */
+ zlog_warn ("ripng join on %s EADDRINUSE (ignoring)\n", ifp->name);
+ return 0; /* not an error */
+ }
+
if (ret < 0)
zlog_warn ("can't setsockopt IPV6_JOIN_GROUP: %s", strerror (errno));