From owner-dev-commits-src-branches@freebsd.org Tue Aug 31 11:51:45 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 171BB66D10C; Tue, 31 Aug 2021 11:51:45 +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 4GzQX06SZ3z4pKZ; Tue, 31 Aug 2021 11:51:44 +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 B157311757; Tue, 31 Aug 2021 11:51:44 +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 17VBpipG096217; Tue, 31 Aug 2021 11:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17VBpiRY096216; Tue, 31 Aug 2021 11:51:44 GMT (envelope-from git) Date: Tue, 31 Aug 2021 11:51:44 GMT Message-Id: <202108311151.17VBpiRY096216@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: b8110a4d7302 - stable/13 - pfctl: fix killing states by ID 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/13 X-Git-Reftype: branch X-Git-Commit: b8110a4d7302069d8ecbbca3d0f64043136e4db3 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: Tue, 31 Aug 2021 11:51:45 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b8110a4d7302069d8ecbbca3d0f64043136e4db3 commit b8110a4d7302069d8ecbbca3d0f64043136e4db3 Author: Kristof Provost AuthorDate: 2021-08-24 10:24:28 +0000 Commit: Kristof Provost CommitDate: 2021-08-31 07:47:20 +0000 pfctl: fix killing states by ID Since the conversion to the new DIOCKILLSTATESNV the kernel no longer exists the id and creatorid to be big-endian. As a result killing states by id (i.e. `pfctl -k id -k 12345`) no longer worked. Reported by: Özkan KIRIK MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e59eff9ad3285838730acf48f6d066cec0e53114) --- sbin/pfctl/pfctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 6c689edf7c43..ad2cfd4e63bc 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -908,7 +908,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) if ((sscanf(state_kill[1], "%jx/%x", &kill.cmp.id, &kill.cmp.creatorid)) == 2) - HTONL(kill.cmp.creatorid); else if ((sscanf(state_kill[1], "%jx", &kill.cmp.id)) == 1) { kill.cmp.creatorid = 0; } else { @@ -920,7 +919,6 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - kill.cmp.id = htobe64(kill.cmp.id); if (pfctl_kill_states(dev, &kill, &killed)) err(1, "DIOCKILLSTATES");