Date: Tue, 13 Nov 2012 08:35:25 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242956 - user/andre/tcp_workqueue/sys/netinet Message-ID: <201211130835.qAD8ZP7C016169@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Tue Nov 13 08:35:25 2012 New Revision: 242956 URL: http://svnweb.freebsd.org/changeset/base/242956 Log: Remove IN_ZERONET macro and test from icmp_reflect() that was added with r120958 to drop such packets. It was only applied to ICMP while the normal ip_input() path continues to allow it leading to inconsistent behavior between ICMP and TCP/UDP. Due to the global IPv4 address shortage it may be helpful to have 0.0.0.0/8, with the exception of 0.0.0.0/32, available as another private IP range. A close reading of RFC5735 and RFC1122 is not entirely conclusive. While usage in a local ("this") scope may be allowed, forwarding may be prohibited. A survey on how other OS's handle 0.0.0.0/8 should be conducted. Reported by: Sean Chittenden <sean-at-chittenden.org> Modified: user/andre/tcp_workqueue/sys/netinet/in.h user/andre/tcp_workqueue/sys/netinet/ip_icmp.c Modified: user/andre/tcp_workqueue/sys/netinet/in.h ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/in.h Tue Nov 13 07:39:49 2012 (r242955) +++ user/andre/tcp_workqueue/sys/netinet/in.h Tue Nov 13 08:35:25 2012 (r242956) @@ -367,7 +367,6 @@ __END_DECLS #define IN_LINKLOCAL(i) (((u_int32_t)(i) & 0xffff0000) == 0xa9fe0000) #define IN_LOOPBACK(i) (((u_int32_t)(i) & 0xff000000) == 0x7f000000) -#define IN_ZERONET(i) (((u_int32_t)(i) & 0xff000000) == 0) #define IN_PRIVATE(i) ((((u_int32_t)(i) & 0xff000000) == 0x0a000000) || \ (((u_int32_t)(i) & 0xfff00000) == 0xac100000) || \ Modified: user/andre/tcp_workqueue/sys/netinet/ip_icmp.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/ip_icmp.c Tue Nov 13 07:39:49 2012 (r242955) +++ user/andre/tcp_workqueue/sys/netinet/ip_icmp.c Tue Nov 13 08:35:25 2012 (r242956) @@ -694,8 +694,7 @@ icmp_reflect(struct mbuf *m) int optlen = (ip->ip_hl << 2) - sizeof(struct ip); if (IN_MULTICAST(ntohl(ip->ip_src.s_addr)) || - IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) || - IN_ZERONET(ntohl(ip->ip_src.s_addr)) ) { + IN_EXPERIMENTAL(ntohl(ip->ip_src.s_addr)) ) { m_freem(m); /* Bad return address */ ICMPSTAT_INC(icps_badaddr); goto done; /* Ip_output() will check for broadcast */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211130835.qAD8ZP7C016169>