From nobody Tue Jan 24 08:36:46 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 4P1L1C0sVmz30tdJ; Tue, 24 Jan 2023 08:36:47 +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 4P1L1C0L0Dz3MlM; Tue, 24 Jan 2023 08:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674549407; 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=vOFG99bGEPL9X/r32gSOUuV61HkIbVQBAJrf+znbC9c=; b=EcxDbClgfhfxwprxnO1HFo8kg6wwR/grZ5lL8sIhNwTzKOyJbBK/3kAdjZPFGOaTh4wXKO oKi2N2ocV5uN1muoSp4UL8OZPeWNiKM7Neg7vesdkYUQ+ZCHx0GyTg1EysR/26MCICOdzB 53mqfXNvuS+PdfIaiSCoH84KYMytraSWKoZIX1CosmwZ4K7kREnWNAEcH9XnV07fsJ65ig vDstUnrwjcgJMuRaIP586K99j9xtq9gkyswS4MirWr44cYF0ZlJla+u8DtRXvDvfVKTwFY Rhw+sQDvuJe+dEEwL0P61bXWgUlhF2O6HjVs+n0JQB2nWRCZ87KAY9TO7A+RAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674549407; 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=vOFG99bGEPL9X/r32gSOUuV61HkIbVQBAJrf+znbC9c=; b=hObfT+ey7uTKdTD3PE828vcBLLXCvHjPUVv87iSYYBkzB62sElYq+grMfNDizDHv1Jh6ZX RlteWw0++XbpW2Oo4xAKg59Rw4V23IvvWBU0h2VgO76Z4yJrXcwVUnZqjyDQzSBmQrBmyi iYOaf04Af3elhf91CdAfKTILxyBkdMVk62gf/wBtlPSyI+UwDgQmRUve1C0R3StcO2JteB bLhqWZiDZHFo6ziTMXycPaQJRxZ4gPz/Pu3BJCGP+RCFZqc7CDTF081lgPHriBEbWgGZ2r vzhmFvJkVzxWMPpY0SEmCnQVnNTK+LNa4oHb1WdJIX7sgLLDDaYfEBsFeiPkhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674549407; a=rsa-sha256; cv=none; b=iTQe42bxMkjRPTmnqey5qqUqXLDUgoo2GVaX1+nFvQ33YDqWgZLnVpIUr1eK9EKqSrdH6P fahUntPB6IAXLaKVAXBnC3DDokix69X9y+M86F9GPWl0An+gbsnU+aaJaUDJpn0/u+15B1 5O3L1qTdSOUXaV0MbJCkwpeLr9ZLiI+r1Qi2sru8mwmdRDoNtQF42gL3Q8oC+dvI4N2ir5 FncrC7kmK+Ey26wEpJbdksmA0n2gXNuTW6iPZn3iR49bJ12fC5eMn+fAD0RIhRDVNR13wp bz2rGspJEwQ3v/QtJrtcNNk2Y0Volnj0JEW9OXfmDUa9c/xijKYyUeDl4BSQcA== 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 4P1L1B6Tvjz12wf; Tue, 24 Jan 2023 08:36:46 +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 30O8akhq007281; Tue, 24 Jan 2023 08:36:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30O8akxQ007280; Tue, 24 Jan 2023 08:36:46 GMT (envelope-from git) Date: Tue, 24 Jan 2023 08:36:46 GMT Message-Id: <202301240836.30O8akxQ007280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: cd80c52cade3 - main - pfctl: rule.label is a two-dimensional array 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/main X-Git-Reftype: branch X-Git-Commit: cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 commit cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 Author: Kristof Provost AuthorDate: 2023-01-24 06:46:46 +0000 Commit: Kristof Provost CommitDate: 2023-01-24 06:46:46 +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 --- 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 37c9625492b1..f60e3f67e082 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1309,7 +1309,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"); @@ -1363,7 +1363,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);