summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgollo <gollo@openbsd.org>2009-12-07 08:19:37 +0000
committergollo <gollo@openbsd.org>2009-12-07 08:19:37 +0000
commit267cda6a5038c2ac6a400380ac2bbbef3379f159 (patch)
tree05956130a7f30f2b13835f706eefa28495e51098
parentbehaviour for the -l flag differs between this implementation and posix; (diff)
downloadwireguard-openbsd-267cda6a5038c2ac6a400380ac2bbbef3379f159.tar.xz
wireguard-openbsd-267cda6a5038c2ac6a400380ac2bbbef3379f159.zip
do not forward and drop packets with M_MCAST flag set in ip_forward()
ok henning@, claudio@ "I think this should go in"
-rw-r--r--sys/netinet/ip_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index fab61db1594..aff88edb71e 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.173 2009/11/19 22:07:17 otto Exp $ */
+/* $OpenBSD: ip_input.c,v 1.174 2009/12/07 08:19:37 gollo Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -1435,7 +1435,7 @@ ip_forward(m, srcrt)
printf("forward: src %x dst %x ttl %x\n", ip->ip_src.s_addr,
ip->ip_dst.s_addr, ip->ip_ttl);
#endif
- if (m->m_flags & M_BCAST || in_canforward(ip->ip_dst) == 0) {
+ if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) {
ipstat.ips_cantforward++;
m_freem(m);
return;