summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authornorby <norby@openbsd.org>2005-10-05 17:32:22 +0000
committernorby <norby@openbsd.org>2005-10-05 17:32:22 +0000
commitc8975b30091ee74d79c609f272c12c7787fdd166 (patch)
treed4c4b533f0e23658d84908177f2e2c717266986e /sys/netinet/ip_output.c
parentthe Wistron CM9 Mini PCI is supported (Chris Cappuccio: "works fine as (diff)
downloadwireguard-openbsd-c8975b30091ee74d79c609f272c12c7787fdd166.tar.xz
wireguard-openbsd-c8975b30091ee74d79c609f272c12c7787fdd166.zip
Add multicast routing to GENERIC.
It is now possible to enable multicast routing in the kernel with the sysctl option net.inet.ip.mforwarding=1 Based on intial work by msf@ help claudio@ ok claudio@ deraadt@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index f1eb4f209b2..dae7a979b9e 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.172 2005/06/10 15:53:07 markus Exp $ */
+/* $OpenBSD: ip_output.c,v 1.173 2005/10/05 17:32:22 norby Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -78,6 +78,7 @@ extern int ipsec_esp_trans_default_level;
extern int ipsec_esp_network_default_level;
extern int ipsec_ipcomp_default_level;
extern int ipforwarding;
+extern int ipmforwarding;
#endif /* IPSEC */
static struct mbuf *ip_insertoptions(struct mbuf *, struct mbuf *, int *);
@@ -501,7 +502,8 @@ ip_output(struct mbuf *m0, ...)
*/
extern struct socket *ip_mrouter;
- if (ip_mrouter && (flags & IP_FORWARDING) == 0) {
+ if (ipmforwarding && ip_mrouter &&
+ (flags & IP_FORWARDING) == 0) {
if (ip_mforward(m, ifp) != 0) {
m_freem(m);
goto done;
@@ -1509,7 +1511,7 @@ ip_ctloutput(op, so, level, optname, mp)
error = ENOBUFS;
break;
}
-
+
}
m->m_len = len;
*mtod(m, u_int16_t *) = ipr->ref_type;