Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Dec 2011 00:02:49 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Maxim Sobolev <sobomax@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann <andre@FreeBSD.org>
Subject:   Re: svn: head/sys/netinet
Message-ID:  <20111230200249.GF12721@FreeBSD.org>
In-Reply-To: <4EFE0FC1.6070909@FreeBSD.org>
References:  <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<mcins1-at-gmail.com>
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111230200249.GF12721>