From 1cbc4a6ff605f36cffb881244c86aeeeb00e4664 Mon Sep 17 00:00:00 2001 From: Babak Farrokhi Date: Fri, 5 Feb 2021 00:54:20 +0000 Subject: net/radvd: improve FreeBSD multicast patch for version 12 and up PR: 252877 Submitted by: Franco Fichtner --- net/radvd/files/patch-device-bsd44.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'net/radvd/files/patch-device-bsd44.c') diff --git a/net/radvd/files/patch-device-bsd44.c b/net/radvd/files/patch-device-bsd44.c index 395bb3614b9d..721c6785978e 100644 --- a/net/radvd/files/patch-device-bsd44.c +++ b/net/radvd/files/patch-device-bsd44.c @@ -1,6 +1,6 @@ ---- device-bsd44.c.orig 2018-02-18 22:45:02 UTC +--- device-bsd44.c.orig 2019-07-20 03:58:19 UTC +++ device-bsd44.c -@@ -126,7 +126,31 @@ ret: +@@ -126,8 +126,29 @@ ret: return -1; } @@ -8,7 +8,7 @@ +int setup_allrouters_membership(int sock, struct Interface *iface) +{ + struct ipv6_mreq mreq; -+ + + memset(&mreq, 0, sizeof(mreq)); + mreq.ipv6mr_interface = iface->props.if_index; + @@ -19,21 +19,19 @@ + return (-1); + } + -+ /* if we leave unconditionally the join cannot fail */ -+ setsockopt(sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof(mreq)); -+ + if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, -+ &mreq, sizeof(mreq)) < 0) { ++ &mreq, sizeof(mreq)) < 0 && !iface->state_info.ready) { + flog(LOG_ERR, "can't join ipv6-allrouters on %s", iface->props.name); + return (-1); + } + + return 0; +} - ++ int set_interface_linkmtu(const char *iface, uint32_t mtu) { -@@ -161,5 +185,5 @@ int check_ip6_forwarding(void) + dlog(LOG_DEBUG, 4, "setting LinkMTU (%u) for %s is not supported", mtu, iface); +@@ -161,5 +182,5 @@ int check_ip6_forwarding(void) int check_ip6_iface_forwarding(const char *iface) { dlog(LOG_DEBUG, 4, "checking ipv6 forwarding of interface not supported"); -- cgit v1.2.3