Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -p -r1.129 -r1.130 --- src/sys/netinet/ip_input.c 2001/03/02 02:05:36 1.129 +++ src/sys/netinet/ip_input.c 2001/03/02 04:26:10 1.130 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.129 2001/03/02 02:05:36 itojun Exp $ */ +/* $NetBSD: ip_input.c,v 1.130 2001/03/02 04:26:10 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -414,15 +414,17 @@ ip_input(struct mbuf *m) * not allowed. */ if (IN_MULTICAST(ip->ip_src.s_addr)) { - /* XXX stat */ + ipstat.ips_badaddr++; goto bad; } /* 127/8 must not appear on wire - RFC1122 */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { - if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) + if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) { + ipstat.ips_badaddr++; goto bad; + } } if (in_cksum(m, hlen) != 0) {