summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_proto.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-05-27 23:40:27 +0000
committerclaudio <claudio@openbsd.org>2006-05-27 23:40:27 +0000
commitd9c6379ef7cfdcc627f44a8df0f7f3af95c8acf5 (patch)
tree235831cac952443c9a22a54544dccb68a2c6f300 /sys/netinet6/in6_proto.c
parentsupport 'make lint' in dirs which contain .y and .l files, help from naddy (diff)
downloadwireguard-openbsd-d9c6379ef7cfdcc627f44a8df0f7f3af95c8acf5.tar.xz
wireguard-openbsd-d9c6379ef7cfdcc627f44a8df0f7f3af95c8acf5.zip
Do the same thing as for IPv4. Use a sysctl to enable/disable mfrowarding
and additionaly make the code part of the MROUTING option. Put it in deraadt@
Diffstat (limited to 'sys/netinet6/in6_proto.c')
-rw-r--r--sys/netinet6/in6_proto.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index ea881b14f77..6eda9527782 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_proto.c,v 1.47 2005/10/14 02:44:27 brad Exp $ */
+/* $OpenBSD: in6_proto.c,v 1.48 2006/05/27 23:40:27 claudio Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
@@ -95,7 +95,9 @@
#include <netinet/ip_esp.h>
#include <netinet/ip_ipip.h>
+#ifdef MROUTING
#include <netinet6/pim6_var.h>
+#endif
#include <netinet6/nd6.h>
@@ -213,11 +215,13 @@ struct ip6protosw inet6sw[] = {
},
#endif /* INET */
#endif /* GIF */
+#ifdef MROUTING
{ SOCK_RAW, &inet6domain, IPPROTO_PIM, PR_ATOMIC|PR_ADDR,
pim6_input, rip6_output, 0, rip6_ctloutput,
rip6_usrreq,
0, 0, 0, 0,
},
+#endif
#if NCARP > 0
{ SOCK_RAW, &inet6domain, IPPROTO_CARP, PR_ATOMIC|PR_ADDR,
carp6_proto_input, rip6_output, 0, rip6_ctloutput,
@@ -250,6 +254,7 @@ struct domain inet6domain =
* Internet configuration info
*/
int ip6_forwarding = 0; /* no forwarding unless sysctl'd to enable */
+int ip6_mforwarding = 0; /* no mulitcast forwarding unless ... */
int ip6_sendredirects = 1;
int ip6_defhlim = IPV6_DEFHLIM;
int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;