From 6d078ff808ebcb89f4fa8cd909d5758a5b18bdd2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 28 Jan 2023 09:32:34 -0500 Subject: [PATCH] babeld: During intf startup, ignore address already in use When listening on a multicast group. No need to actually fail the operation when it's already being used. Let's not treat the Address already in use error message as one that is stopping everything from working. Especially since multiple interface events cause this to happen. Without this, if config is read in before full connection to zebra, babel will never establish neighbors. Signed-off-by: Donald Sharp --- babeld/babel_interface.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index cc50898017..4ca875206f 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -632,15 +632,15 @@ interface_recalculate(struct interface *ifp) rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*)&mreq, sizeof(mreq)); - if(rc < 0) { - flog_err_sys(EC_LIB_SOCKET, - "setsockopt(IPV6_JOIN_GROUP) on interface '%s': %s", - ifp->name, safe_strerror(errno)); - /* This is probably due to a missing link-local address, - so down this interface, and wait until the main loop - tries to up it again. */ - interface_reset(ifp); - return -1; + if (rc < 0 && errno != EADDRINUSE) { + flog_err_sys(EC_LIB_SOCKET, + "setsockopt(IPV6_JOIN_GROUP) on interface '%s': %s", + ifp->name, safe_strerror(errno)); + /* This is probably due to a missing link-local address, + so down this interface, and wait until the main loop + tries to up it again. */ + interface_reset(ifp); + return -1; } set_timeout(&babel_ifp->hello_timeout, babel_ifp->hello_interval);