From owner-dev-commits-src-branches@freebsd.org Sat Jul 31 13:04:01 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F146C65BA6E; Sat, 31 Jul 2021 13:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GcPbh0yP3z4SYw; Sat, 31 Jul 2021 13:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7620D1966A; Sat, 31 Jul 2021 13:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16VD3x5J066768; Sat, 31 Jul 2021 13:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16VD3x0c066767; Sat, 31 Jul 2021 13:03:59 GMT (envelope-from git) Date: Sat, 31 Jul 2021 13:03:59 GMT Message-Id: <202107311303.16VD3x0c066767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: bca83d9e7f5b - stable/12 - pf: fix ABI breakage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bca83d9e7f5b7faa925ca7edde6129f57adcd09d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2021 13:04:01 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bca83d9e7f5b7faa925ca7edde6129f57adcd09d commit bca83d9e7f5b7faa925ca7edde6129f57adcd09d Author: Kristof Provost AuthorDate: 2021-07-28 09:24:44 +0000 Commit: Kristof Provost CommitDate: 2021-07-31 09:14:44 +0000 pf: fix ABI breakage The introduction of synproxy support changed the size of struct pf_status, which in turn broke the userspace ABI. Revert the relevant change. More work is needed on the synproxy code to keep and expose the counters, but in the mean time this restores the ABI. PR: 257469 MFC after: 3 days Sponsored by: Modirum MDPay (cherry picked from commit da8d8b22e69c72f1d001d55b5eff5acbb0265cfc) --- sys/netpfil/pf/pf.h | 3 +-- sys/netpfil/pf/pf_syncookies.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index 245d68b4be45..e030f1e59de0 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -160,8 +160,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE, PF_ADDR_DYNIFTL, #define LCNT_SRCCONNRATE 4 /* max-src-conn-rate */ #define LCNT_OVERLOAD_TABLE 5 /* entry added to overload table */ #define LCNT_OVERLOAD_FLUSH 6 /* state entries flushed */ -#define LCNT_SYNCOOKIES_VALID 7 /* syncookies validated */ /* XXX TODO: Ensure no API breakage! */ -#define LCNT_MAX 8 /* total+1 */ +#define LCNT_MAX 7 /* total+1 */ #define LCNT_NAMES { \ "max states per rule", \ diff --git a/sys/netpfil/pf/pf_syncookies.c b/sys/netpfil/pf/pf_syncookies.c index bfcc4b3d4e82..a02ab0370204 100644 --- a/sys/netpfil/pf/pf_syncookies.c +++ b/sys/netpfil/pf/pf_syncookies.c @@ -275,7 +275,6 @@ pf_syncookie_validate(struct pf_pdesc *pd) if ((ack & ~0xff) != (hash & ~0xff)) return (0); - counter_u64_add(V_pf_status.lcounters[LCNT_SYNCOOKIES_VALID], 1); return (1); }