From owner-svn-src-user@FreeBSD.ORG Tue Nov 13 08:35:26 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36493841; Tue, 13 Nov 2012 08:35:26 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 031C98FC13; Tue, 13 Nov 2012 08:35:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAD8ZPG2016172; Tue, 13 Nov 2012 08:35:25 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAD8ZP7C016169; Tue, 13 Nov 2012 08:35:25 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211130835.qAD8ZP7C016169@svn.freebsd.org> From: Andre Oppermann Date: Tue, 13 Nov 2012 08:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242956 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 08:35:26 -0000 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 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 */