From owner-svn-src-all@FreeBSD.ORG Tue May 12 07:25:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7228AC3E; Tue, 12 May 2015 07:25:01 +0000 (UTC) Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com [IPv6:2607:f8b0:4002:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30ED212E6; Tue, 12 May 2015 07:25:01 +0000 (UTC) Received: by ykep21 with SMTP id p21so45521484yke.3; Tue, 12 May 2015 00:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HrInTkZptRVs4HvbIe71xuqumLcq81kSrjfzdSmox5Q=; b=SY2Nk05FjjYYE87AxB9L2jO3o48GpW8RYGNM8Yx1bAkO62z4DkH0FJVwrxr904L8GA WZrYxH8nUe2T1prYJpAWdy6Qo+tpcpsRH4U7oeW78I1dcT5ChI9EhfP0A20SHdFqmIny jz+oFUdKC5KLVyavKeR3I4cnmDJHdiTiFGPmuBP8o/NqQ7A7uLUOOOhWQvd4JcouB88T nukuLWZQvzWfXnebyS7PwgIv07swi8iUh9cGCmzTd//dFaCMTQQ6YSaDF5XQU02P/sVi B2oI5bPml/iQOTJhk3iUsofJcPJbTKdWWoNqbWjDKfhaq8QgRrsu8zew8J9263PbIKQQ ZVng== MIME-Version: 1.0 X-Received: by 10.236.199.11 with SMTP id w11mr14202877yhn.81.1431415500196; Tue, 12 May 2015 00:25:00 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.129.123.197 with HTTP; Tue, 12 May 2015 00:25:00 -0700 (PDT) In-Reply-To: <201504280929.t3S9TTE6061279@svn.freebsd.org> References: <201504280929.t3S9TTE6061279@svn.freebsd.org> Date: Tue, 12 May 2015 09:25:00 +0200 X-Google-Sender-Auth: HjBfEYu86FleaoBdPcM7U0-l_gE Message-ID: Subject: Re: svn commit: r282132 - head/sys/netipsec From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 07:25:01 -0000 Hello Andrey, do you plan to MFC this one? On Tue, Apr 28, 2015 at 11:29 AM, Andrey V. Elsukov 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