summaryrefslogtreecommitdiff
path: root/sys/netinet6/in6_proto.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-05-27 23:40:28 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-05-27 23:40:28 +0000
commitffb047ab64e1f172ef9a9ae36b8a06fdb69ef5f1 (patch)
tree6a78948349036845e06312619666ba18ce585a6d /sys/netinet6/in6_proto.c
parenteb1ca9bf83835afa564afb5fe71fde464a770b69 (diff)
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;