From nobody Wed Apr 20 11:05:43 2022 X-Original-To: dev-commits-src-main@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 34C0F11D8781; Wed, 20 Apr 2022 11:05:44 +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 4KjyWq5Dvrz4fb0; Wed, 20 Apr 2022 11:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650452744; 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=gKYpenPJ72Dr1ONKBSy5ZrdWkLLLPJ9jyYyZogGwCrA=; b=DWGzMNDNZdL5bFQExYtHF7rLxbMBSYZiOF/AcCEa/bKc4mzwe8FI974BA2I1IAdeAmQVfP KkBDoUy1zenDfWyYfjH3B06kRxERPrHBbq0Ddx8vseFymfwVhNk930Zr5VHp2REXfCaP0+ McaQkynygs2AJvlfzGrHe5DhLiDbtUDs4TfvbxNAWtoKp/0vlzfCC2PwVsSF98r4cdV2Y1 2IkV/1NObczLJ0zS8NDDSLWcGlx/rhCeuYKkB5ILp1FOUQu4j9wjXo3muCROuBe9FA5zwK 6qCbbD2B+SwG9VLfByo9X6FMTBZecjrmtp3rqUZKiFeQFGUWs6k4aK7BR8m1iw== 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 6D63212EB7; Wed, 20 Apr 2022 11:05:43 +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 23KB5hhn042459; Wed, 20 Apr 2022 11:05:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23KB5h50042458; Wed, 20 Apr 2022 11:05:43 GMT (envelope-from git) Date: Wed, 20 Apr 2022 11:05:43 GMT Message-Id: <202204201105.23KB5h50042458@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: a16732d670fa - main - pfctl: always print 'l3' source/destination List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: a16732d670fa6013bc085a5f9bf6b8d2c208de98 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650452744; 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=gKYpenPJ72Dr1ONKBSy5ZrdWkLLLPJ9jyYyZogGwCrA=; b=ivzCWX+VRheQw+trNkHIoEZP1qiTg9gLMfaUDO1g0D9+IvXCP6zdt16xuIaUtEwOsCxMmR QrWuTK31FUGxLvH9KblGZlCOE/3JESLwRIF2nnaPfznuDt/sUy8bjxr631Ns0/zKmgdQ6E 73dU9kkM01pzlBjQOZ55xczRXiUEN4aU1ZF7oxkxK1xGQ0mCU/DlEoMKG6A5IEdv+k6Fff cvmi/ZWXqJj0wH5+H4vrVsnN6VptXSm4qCIPYVBxvVq7g5ZzwFjORDf2mFQQMLX92UcuxC WXDzoRRRbVNZn/ldGiQ6kMP+BDH6KuVoCofFTSUfCyFuYtg8Ng/Gbx9iPbGaQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650452744; a=rsa-sha256; cv=none; b=pqNt9z+xH+zYOI8Eq67J4xuFByZzV04wdJOaMPat/R6Dycv4ulRh2FLWl0uasMbZWtGN8D vAJvv9qWufCEsSQzhZBFOHfs0Ufh1S1AMmJqC4CmwixuTpXlJ4/wNXGMpXUJeMVZ/3ZboS oxPaFDUCqdIYcGH3zrpWratXPL5EpAxXhLYcetXQ61aUM0M6afw51eWdlbRTWGpDZue2bt zkvhoYcdcnEOfYVT539MRlF8iw4ffE6/6dr8QEqxFrZ6hR9Q8OMI3LBG+NL2QQh43VjpTp t6McaJEgGsk5EJZ26M9lF4YrvyKfEPOrIay6rEvFU85Ir/IfE3z2YAurJM7Rfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a16732d670fa6013bc085a5f9bf6b8d2c208de98 commit a16732d670fa6013bc085a5f9bf6b8d2c208de98 Author: Kristof Provost AuthorDate: 2022-04-12 11:29:56 +0000 Commit: Kristof Provost CommitDate: 2022-04-20 11:01:12 +0000 pfctl: always print 'l3' source/destination While the kernel only performs the L3 check for ETHERTYPE_IP/ETHERTYPE_IP6 we should always print the source and destination addresses. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34918 --- sbin/pfctl/pfctl_parser.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 1bd95b076ce6..1f6a194591c0 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -783,12 +783,10 @@ print_eth_rule(struct pfctl_eth_rule *r, const char *anchor_call, printf(" to "); print_eth_addr(&r->dst); } - if (r->proto == ETHERTYPE_IP || r->proto == ETHERTYPE_IPV6) { - printf(" l3"); - print_fromto(&r->ipsrc, PF_OSFP_ANY, &r->ipdst, - r->proto == ETHERTYPE_IP ? AF_INET : AF_INET6, 0, - 0, 0); - } + printf(" l3"); + print_fromto(&r->ipsrc, PF_OSFP_ANY, &r->ipdst, + r->proto == ETHERTYPE_IP ? AF_INET : AF_INET6, 0, + 0, 0); if (r->qname[0]) printf(" queue %s", r->qname); if (r->tagname[0])