From owner-svn-src-stable-11@freebsd.org Wed Nov 1 13:54:17 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D29E5C8F6; Wed, 1 Nov 2017 13:54:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F75A6FB3A; Wed, 1 Nov 2017 13:54:17 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA1DsGFj037264; Wed, 1 Nov 2017 13:54:16 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA1DsGat037263; Wed, 1 Nov 2017 13:54:16 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201711011354.vA1DsGat037263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Nov 2017 13:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325282 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 325282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 13:54:17 -0000 Author: kp Date: Wed Nov 1 13:54:16 2017 New Revision: 325282 URL: https://svnweb.freebsd.org/changeset/base/325282 Log: MFC r324996: Evaluate packet size after the firewall had its chance in the ip6 fast path Defer the packet size check until after the firewall has had a look at it. This means that the firewall now has the opportunity to (re-)fragment an oversized packet. This mirrors what the slow path does. Modified: stable/11/sys/netinet6/ip6_fastfwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_fastfwd.c ============================================================================== --- stable/11/sys/netinet6/ip6_fastfwd.c Wed Nov 1 13:50:35 2017 (r325281) +++ stable/11/sys/netinet6/ip6_fastfwd.c Wed Nov 1 13:54:16 2017 (r325282) @@ -194,7 +194,17 @@ passin: in6_ifstat_inc(rcvif, ifs6_in_noroute); goto dropin; } + /* + * Outgoing packet firewall processing. + */ + if (!PFIL_HOOKED(&V_inet6_pfil_hook)) + goto passout; + if (pfil_run_hooks(&V_inet6_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, + NULL) != 0 || m == NULL) + goto dropout; + + /* * We used slow path processing for packets with scoped addresses. * So, scope checks aren't needed here. */ @@ -205,14 +215,6 @@ passin: goto dropout; } - /* - * Outgoing packet firewall processing. - */ - if (!PFIL_HOOKED(&V_inet6_pfil_hook)) - goto passout; - if (pfil_run_hooks(&V_inet6_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, - NULL) != 0 || m == NULL) - goto dropout; /* * If packet filter sets the M_FASTFWD_OURS flag, this means * that new destination or next hop is our local address.