From nobody Tue Jan 31 09:46:01 2023 X-Original-To: dev-commits-src-branches@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 4P5gCs4yMCz3c0n1; Tue, 31 Jan 2023 09:46:01 +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 4P5gCs4HWwz4Dj3; Tue, 31 Jan 2023 09:46:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675158361; 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=KYFTZdcDBvffw1jbcujNFxorGDRQTqFyaJjgvkJOejY=; b=wT14F2sreoDYS3DTro5T2+rYcyQJvtWWVPQ4ISMCKaAkZ/8tfcZlu5Y6dWcsDt2E1zEqIX gFyFjPZPzeTjVagscbQuUnyZAZP7miAMTBvv6V7Y9nyWX7QvX5GMh3cNHvnXfjYWxTccFN iLx6OyYu8W79Mx/+Px7rYF0Jq+beAZogPpOtIVFXfA/BEKzRmsb+yTNvkiKxDUv3lgIUdO Airhwbw9QvnWGRTePkMyRRjddxWZHv1K9Nmec7DxsQ99lal4t3wNf7xF5d7BmZ2oXEDOFo 5BcUhurso1Chlm7gH4d7Jho1wyQj7wtYkbGyLFKwY5mcQG7GePQIUaTytjq2Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675158361; 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=KYFTZdcDBvffw1jbcujNFxorGDRQTqFyaJjgvkJOejY=; b=nb5l52DSGOouM96PpXpmcaIlNOSJmMKdnmv6tNUbPZ57dmaXjNF/rPbBqWLXSod8TioBdQ lYAoyfVGw7kMBUCBHVAROBbzLiPKiMlZOCJYlRw3N+gvNBZPYVb/7Sd2EL4HwBYj2/M5uw U3Ykzro88Y9OjvJ6HgC0SSyMAJLGEp5bU1PwHQ82s0lzh3yWBq4+yiyTCgs0idglbYZGej ktwoJaeNSPyGLWG/KxiIEg0ZpEd02HonnpNwWt4QzpyJEQdGdEDvi/vwyYuFQxso9zP8N7 QbiU0L1szuI9Lc07flgpeNif4Zm0sRE4NKubHNdDDa9LJrPGmmmZT9zwWpt8Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675158361; a=rsa-sha256; cv=none; b=EOzaFm1mQvbbRjBYud2N4yv969Vgtv+PMv0s9USHp5hhsIVGIPiod3pez6zWm5XbOJ6SHm k1q3wqHU//y/2/DKeWquH71kO3jAYD9FwilmqIiQhj1BGsWT1a1jTFT6a/mRld0g83wn2t VCyQ1lbF6g529pSR3MavU0HBg5M7edUzhSZvWOc+RZyzEn7aYN6k1L7yJkyKVrlUoH0YYd OW8kk/buz8YTyyQ/HXKuGSEwRfUsMrJtxcmtdzzvjItcQbyEfGoFot2rPfPb7JyW18AGmM OKp3/u7HNTk0c/A14+XcdqRz0vput/0/8m8zfXOFosWQsEiMkUA3K9ZKZaYrAw== 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 4P5gCs3DrYzkZp; Tue, 31 Jan 2023 09:46:01 +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 30V9k1XZ040966; Tue, 31 Jan 2023 09:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30V9k14G040965; Tue, 31 Jan 2023 09:46:01 GMT (envelope-from git) Date: Tue, 31 Jan 2023 09:46:01 GMT Message-Id: <202301310946.30V9k14G040965@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: 5a0cbbcaca6d - stable/12 - pfctl: rule.label is a two-dimensional array List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 5a0cbbcaca6dcb656cb9d7b50de3a81654d02020 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5a0cbbcaca6dcb656cb9d7b50de3a81654d02020 commit 5a0cbbcaca6dcb656cb9d7b50de3a81654d02020 Author: Kristof Provost AuthorDate: 2023-01-24 06:46:46 +0000 Commit: Kristof Provost CommitDate: 2023-01-31 03:29:52 +0000 pfctl: rule.label is a two-dimensional array Fix checking for a non-empty first string. PR: 269075 MFC after: 1 week Reported by: nreilly@blackberry.com (cherry picked from commit cd80c52cade3e38d273eecec6f9b0a7cba23bcc8) --- sbin/pfctl/pfctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 5b170219e2ab..6fb7aeb45d00 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1130,7 +1130,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, case PFCTL_SHOW_LABELS: break; case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; print_rule(&rule, anchor_call, rule_numbers, numeric); printf("\n"); @@ -1184,7 +1184,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, break; } case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; INDENT(depth, !(opts & PF_OPT_VERBOSE)); print_rule(&rule, anchor_call, rule_numbers, numeric);