Date: Tue, 12 May 2015 09:25:00 +0200 From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= <eri@freebsd.org> To: "Andrey V. Elsukov" <ae@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282132 - head/sys/netipsec Message-ID: <CAPBZQG3kX0CEMfzhKLQkBpkWGf1OnWtM87wHEQioMWV5iJgP0A@mail.gmail.com> In-Reply-To: <201504280929.t3S9TTE6061279@svn.freebsd.org> References: <201504280929.t3S9TTE6061279@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Andrey, do you plan to MFC this one? On Tue, Apr 28, 2015 at 11:29 AM, Andrey V. Elsukov <ae@freebsd.org> wrote: > Author: ae > Date: Tue Apr 28 09:29:28 2015 > New Revision: 282132 > URL: https://svnweb.freebsd.org/changeset/base/282132 > > Log: > Since PFIL can change mbuf pointer, we should update pointers after > calling ipsec_filter(). > > Sponsored by: Yandex LLC > > Modified: > head/sys/netipsec/ipsec_input.c > head/sys/netipsec/ipsec_output.c > > Modified: head/sys/netipsec/ipsec_input.c > > ============================================================================== > --- head/sys/netipsec/ipsec_input.c Tue Apr 28 09:19:40 2015 > (r282131) > +++ head/sys/netipsec/ipsec_input.c Tue Apr 28 09:29:28 2015 > (r282132) > @@ -391,6 +391,7 @@ ipsec4_common_input_cb(struct mbuf *m, s > ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE); > if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) > return (error); > + ip = mtod(m, struct ip *); > #endif /* DEV_ENC */ > > /* IP-in-IP encapsulation */ > > Modified: head/sys/netipsec/ipsec_output.c > > ============================================================================== > --- head/sys/netipsec/ipsec_output.c Tue Apr 28 09:19:40 2015 > (r282131) > +++ head/sys/netipsec/ipsec_output.c Tue Apr 28 09:29:28 2015 > (r282132) > @@ -578,6 +578,7 @@ ipsec4_process_packet(struct mbuf *m, st > /* pass the mbuf to enc0 for packet filtering */ > if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) > goto bad; > + ip = mtod(m, struct ip *); > #endif > /* Do the appropriate encapsulation, if necessary */ > if (isr->saidx.mode == IPSEC_MODE_TUNNEL || /* Tunnel requ'd */ > @@ -699,6 +700,7 @@ ipsec6_process_packet(struct mbuf *m, st > /* pass the mbuf to enc0 for packet filtering */ > if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) > goto bad; > + ip6 = mtod(m, struct ip6_hdr *); > #endif /* DEV_ENC */ > > /* Do the appropriate encapsulation, if necessary */ > > -- Ermal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPBZQG3kX0CEMfzhKLQkBpkWGf1OnWtM87wHEQioMWV5iJgP0A>