View | Details | Raw Unified | Return to bug 252877
Collapse All | Expand All

(-)b/net/radvd/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	radvd
4
PORTNAME=	radvd
5
PORTVERSION=	2.19
5
PORTVERSION=	2.19
6
PORTREVISION=	1
6
CATEGORIES=	net
7
CATEGORIES=	net
7
MASTER_SITES=	http://www.litech.org/radvd/dist/
8
MASTER_SITES=	http://www.litech.org/radvd/dist/
8
9
(-)b/net/radvd/files/patch-device-bsd44.c (-9 / +7 lines)
Lines 1-6 Link Here
1
--- device-bsd44.c.orig	2018-02-18 22:45:02 UTC
1
--- device-bsd44.c.orig	2019-07-20 03:58:19 UTC
2
+++ device-bsd44.c
2
+++ device-bsd44.c
3
@@ -126,7 +126,31 @@ ret:
3
@@ -126,8 +126,29 @@ ret:
4
 	return -1;
4
 	return -1;
5
 }
5
 }
6
 
6
 
Lines 8-14 Link Here
8
+int setup_allrouters_membership(int sock, struct Interface *iface) 
8
+int setup_allrouters_membership(int sock, struct Interface *iface) 
9
+{
9
+{
10
+	struct ipv6_mreq mreq;
10
+	struct ipv6_mreq mreq;
11
+
11
 
12
+	memset(&mreq, 0, sizeof(mreq));
12
+	memset(&mreq, 0, sizeof(mreq));
13
+	mreq.ipv6mr_interface = iface->props.if_index;
13
+	mreq.ipv6mr_interface = iface->props.if_index;
14
+
14
+
Lines 19-39 Link Here
19
+		return (-1);
19
+		return (-1);
20
+	}
20
+	}
21
+
21
+
22
+	/* if we leave unconditionally the join cannot fail */
23
+	setsockopt(sock, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof(mreq));
24
+
25
+	if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
22
+	if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP,
26
+			&mreq, sizeof(mreq)) < 0) {
23
+			&mreq, sizeof(mreq)) < 0 && !iface->state_info.ready) {
27
+		flog(LOG_ERR, "can't join ipv6-allrouters on %s", iface->props.name);
24
+		flog(LOG_ERR, "can't join ipv6-allrouters on %s", iface->props.name);
28
+		return (-1);
25
+		return (-1);
29
+	}
26
+	}
30
+
27
+
31
+	return 0; 
28
+	return 0; 
32
+}
29
+}
33
 
30
+
34
 int set_interface_linkmtu(const char *iface, uint32_t mtu)
31
 int set_interface_linkmtu(const char *iface, uint32_t mtu)
35
 {
32
 {
36
@@ -161,5 +185,5 @@ int check_ip6_forwarding(void)
33
 	dlog(LOG_DEBUG, 4, "setting LinkMTU (%u) for %s is not supported", mtu, iface);
34
@@ -161,5 +182,5 @@ int check_ip6_forwarding(void)
37
 int check_ip6_iface_forwarding(const char *iface)
35
 int check_ip6_iface_forwarding(const char *iface)
38
 {
36
 {
39
 	dlog(LOG_DEBUG, 4, "checking ipv6 forwarding of interface not supported");
37
 	dlog(LOG_DEBUG, 4, "checking ipv6 forwarding of interface not supported");
(-)b/net/radvd/files/patch-interface.c (+23 lines)
Added Link Here
1
--- interface.c.orig	2020-12-29 09:42:21 UTC
2
+++ interface.c
3
@@ -61,6 +61,8 @@ void touch_iface(struct Interface *iface)
4
 
5
 int setup_iface(int sock, struct Interface *iface)
6
 {
7
+	int was_ready = iface->state_info.ready;
8
+
9
 	iface->state_info.changed = 0;
10
 	iface->state_info.ready = 0;
11
 
12
@@ -97,8 +99,11 @@ int setup_iface(int sock, struct Interface *iface)
13
 		return -1;
14
 	}
15
 
16
+	iface->state_info.ready = was_ready;
17
+
18
 	/* join the allrouters multicast group so we get the solicitations */
19
 	if (setup_allrouters_membership(sock, iface) < 0) {
20
+		iface->state_info.ready = 0;
21
 		return -1;
22
 	}
23
 

Return to bug 252877