From owner-svn-src-head@FreeBSD.ORG Fri Dec 30 20:02:52 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12917106566B; Fri, 30 Dec 2011 20:02:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3BD8FC15; Fri, 30 Dec 2011 20:02:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBUK2nCk025819; Sat, 31 Dec 2011 00:02:49 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBUK2nXX025818; Sat, 31 Dec 2011 00:02:49 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 31 Dec 2011 00:02:49 +0400 From: Gleb Smirnoff To: Maxim Sobolev Message-ID: <20111230200249.GF12721@FreeBSD.org> References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4EFE0FC1.6070909@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 20:02:52 -0000 On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote: M> Won't this break whole lot of third-party software, which expects M> FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. M> -Maxim M> M> On 10/7/2011 6:43 AM, Andre Oppermann wrote: M> > Author: andre M> > Date: Fri Oct 7 13:43:01 2011 M> > New Revision: 226105 M> > URL: http://svn.freebsd.org/changeset/base/226105 M> > M> > Log: M> > Add back the IP header length to the total packet length field on M> > raw IP sockets. It was deducted in ip_input() in preparation for M> > protocols interested only in the payload. M> > M> > On raw sockets the IP header should be delivered as it at came in M> > from the network except for the byte order swaps in some fields. M> > M> > This brings us in line with all other OS'es that provide raw M> > IP sockets. M> > M> > Reported by: Matthew Cini Sarreo M> > MFC after: 3 days M> > M> > Modified: M> > head/sys/netinet/raw_ip.c M> > M> > Modified: head/sys/netinet/raw_ip.c M> > ============================================================================== M> > --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011 (r226104) M> > +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011 (r226105) M> > @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) M> > last = NULL; M> > M> > ifp = m->m_pkthdr.rcvif; M> > + /* M> > + * Add back the IP header length which was M> > + * removed by ip_input(). Raw sockets do M> > + * not modify the packet except for some M> > + * byte order swaps. M> > + */ M> > + ip->ip_len += off; M> > M> > hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, M> > ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); M> > M> > -- Totus tuus, Glebius.