summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoerg Goltermann <gollo@cvs.openbsd.org>2009-12-07 08:19:38 +0000
committerJoerg Goltermann <gollo@cvs.openbsd.org>2009-12-07 08:19:38 +0000
commit5814dd9af65d229298f6bd22bc2aa3dc2977d3bf (patch)
tree3e54ac4390ade61744c080d2f4f73766beee2820 /sys
parent1fbc8cdeb4b61a08d39e5d7b14f8fc9d08cedb34 (diff)
do not forward and drop packets with M_MCAST flag set in ip_forward()
ok henning@, claudio@ "I think this should go in"
Diffstat (limited to 'sys')
-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;