From nobody Fri Nov 10 11:53:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SRcdw1r19z50Qw2; Fri, 10 Nov 2023 11:53:08 +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 4SRcdw1Nq6z3drK; Fri, 10 Nov 2023 11:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699617188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5G4WJ+9OgYdafxRYwv4R/r+TwMKATd2jWwK+TJfli38=; b=mObp+Jak4O/ERUedQ2lnohZVNT/O5sCJdgYED4O1m5Dq5YFHVfj6Lwr4oKLRZ+FNIfRLsL svfoJKWPIqhBio0EQYYNmskZ8PZfErmcc8nL+Se/cRMd4o1zcu8mtKdi4aFMAH0DFEDhjN /+HesQPAxsgo0y7tAF/F5UmA9+YHo7e8B7ai9T02q0JIiexCShyVM9mGSUWUxMUVV7+I81 IpPewPWyKjFhc7n3xQy6unqh5pWsDoOakwcee0iLrmN+coLlH0S/GLRxygvnJXpJD1C0aA 2PO4M73H1ouNaEoQge7RaLHKANDZzOu+83YyOoaq8eFVmDVZI7qDvhI8kqXGbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699617188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5G4WJ+9OgYdafxRYwv4R/r+TwMKATd2jWwK+TJfli38=; b=KmsT9NY0jgapKXo+Wnv0FQvapEm4nZNZSH7Z4V1xqM6J3uyOdwrfW4W0dm4AVC5xfTbpog gVPAaa+0ZpwsyXd3EbrmUMn2f7DjDpvDVrDwTVJzZeF7K8AO7MTMOk9gt4C6ENSGvzJCbX chgXYPPF5a2f7AZNsK2LfhTdXSN5xImqnUW33jQJD0c6IQsTbOoiaemNr2UPFicqtyQE08 gTJZL+XO5Vzi2WHUF1wrYqVTyKmLbwT8CqXGFeD7VZUYvQI4ia2c5tEQbykbNO5qN2OKZe PK8/3pX4mHY6fIwNbJfL67DAMN1y1XHHkM4aF+uTte35zahP4NobUZdWNHYGNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699617188; a=rsa-sha256; cv=none; b=DxLkqdOy45M3yrcAURS4r8S0D8u69Ud8ZD+EqGGi8JXkzAulqUiFZdOpG2bJ4ggzjkvWvz Dz5LchzLPegKVaZxp88gANQa30OYXo26HgoVrmK54G93h6S3BRUloEw8cQSMqHl4B7B1EX 6TJAr1eDXO1HvQfiVsYC2qUDXoWu2o9DcNV2om+gO5RZrS038d7VrhqK5DBP5JTRTxemjS 7zRS1eoVIz/WVni0mV0zFRBhML1V/2Whv1nSIYRJHTL2F/RgS6pGL1KUsFVr9yqNlEJYg7 Q8CALXyuZinqCJTK4jS6LDbYtiw5F4g5WZWhDqTKdLQg6Op3q6DA2E0GKtpgPQ== 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 4SRcdw0SMVzxSq; Fri, 10 Nov 2023 11:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AABr7no099244; Fri, 10 Nov 2023 11:53:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AABr7Ju099241; Fri, 10 Nov 2023 11:53:07 GMT (envelope-from git) Date: Fri, 10 Nov 2023 11:53:07 GMT Message-Id: <202311101153.3AABr7Ju099241@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: 83dbbe8295ff - stable/13 - libpfctl: fix label setting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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: 83dbbe8295ff0bb06a8f6b621c25d8224b026b77 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=83dbbe8295ff0bb06a8f6b621c25d8224b026b77 commit 83dbbe8295ff0bb06a8f6b621c25d8224b026b77 Author: Franco Fichtner AuthorDate: 2023-11-10 11:42:17 +0000 Commit: Kristof Provost CommitDate: 2023-11-10 11:47:44 +0000 libpfctl: fix label setting A mismerge caused the labels list to be added to the wrong nvlist, breaking label configuration. If you compare the change from from main and stable/13 you can see that main uses "nvl" and stable/13 has "nlvr" for nvlist_append_string_array() but the backport changes it to "nlv". This code was supposed to apply to pfctl_add_eth_rule() but instead applied to pfctl_add_rule() for otherwise interesting reasons. Since pfctl_add_eth_rule() uses "nvl" and pfctl_add_rule() uses "nvlr" but also has "nvl" this compiled fine but still broke the label set. Direct commit to stable/13. PR: 275006 --- lib/libpfctl/libpfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index bf25a45b792f..4dec539e250b 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -643,7 +643,7 @@ pfctl_add_rule(int dev, const struct pfctl_rule *r, const char *anchor, labelcount = 0; while (labelcount < PF_RULE_MAX_LABEL_COUNT && r->label[labelcount][0] != 0) { - nvlist_append_string_array(nvl, "labels", + nvlist_append_string_array(nvlr, "labels", r->label[labelcount]); labelcount++; }