diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2005-08-11 12:55:32 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2005-08-11 12:55:32 +0000 |
commit | 6b36094755cc562af879bd2b1c45ad6a6334b064 (patch) | |
tree | 688c6788f99c3d09a33014794a57ad4775526869 /sys/netinet | |
parent | 0f5937b0a2279b0ec5daaae8c37407f2cac23f32 (diff) |
New counter for not joined IPv4 multicast groups.
Don't count link local scope multicast as not forwardable.
This stops ips_cantforward growing on carp(4) networks.
tested and ok mcbride@, ok markus@.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_var.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 63eac232f89..05bb18bae6e 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.130 2005/07/31 03:30:55 pascoe Exp $ */ +/* $OpenBSD: ip_input.c,v 1.131 2005/08/11 12:55:31 mpf Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -446,7 +446,9 @@ ipv4_input(m) */ IN_LOOKUP_MULTI(ip->ip_dst, m->m_pkthdr.rcvif, inm); if (inm == NULL) { - ipstat.ips_cantforward++; + ipstat.ips_notmember++; + if (!IN_LOCAL_GROUP(ip->ip_dst.s_addr)) + ipstat.ips_cantforward++; m_freem(m); return; } diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 3b63a9b8cdc..725798c077f 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_var.h,v 1.34 2005/08/02 11:05:44 markus Exp $ */ +/* $OpenBSD: ip_var.h,v 1.35 2005/08/11 12:55:31 mpf Exp $ */ /* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */ /* @@ -131,6 +131,7 @@ struct ipstat { u_long ips_badaddr; /* invalid address on header */ u_long ips_inhwcsum; /* hardware checksummed on input */ u_long ips_outhwcsum; /* hardware checksummed on output */ + u_long ips_notmember; /* multicasts for unregistered groups */ }; #ifdef _KERNEL |