From nobody Fri Feb 14 17:50:26 2025 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 4Yvfhz4QyKz5nQlR; Fri, 14 Feb 2025 17:50:27 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yvfhz0Yv2z3KPc; Fri, 14 Feb 2025 17:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555427; 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=0dZtYdpg1PepMjQinVJSiJMSmwH1kaeCuTp3Tvh4g2s=; b=X0gNiDzAfbL5DsKd1I9TgcK3L43xMwMm6qJYeDaRStZLBwyna83RzwMGPbWYjGYprc8yAa +NPEswmxAsiANQ1yCOg3WT9frBLSL+fRfWFatMtvWN0Rn8w0PMUXj7noAbs2FBxc6zQKSu oBZhl+A/s9jobiCsUuQ/Tip8FuxEMbdoGiqv4kON+G2lN9YnLXNPAIDyHfk3QT6ywMRhDy 6/Mp2rn3/a2Xm1zwSaUa3K8zwb/7vJNrEP+s9KGxo7CmF/EYvtyLVaLB981n+lzGPGmJQZ MclAZAcwlVhjDFStdiViKK+D8dr3SOCSL8Rnaz6KCE8+emgVIyxRQmn5laVrIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555427; 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=0dZtYdpg1PepMjQinVJSiJMSmwH1kaeCuTp3Tvh4g2s=; b=n6D3G2KT90/4xZ+uKfE//9dLVVGH7chpmqq1wtVxTUdjeq+xVniq7f1+RHk84/j/AP2Wdn CAry234N/g853aK/4o5H7OG5D//6s9z5o5IqpcCCSkb8KRIv3J7i6uCHCL6FhjLi6Q+MZb d/IAh7UulVeeGbd0QWu2m1RQiMOtefVdXJxM0CDC9RUFu/3vgviPJQh/XH7y3Kn+sbKDEo LqwJfIbMr46GwXhLTGCCZ5ZTzBHrzaEORZvXbNoLB+0KRXzkSu0VDohLDBOGlh+HbNZQZe fFZJVKP4arTthcVKzL8SA4dUVyrPX6qsPPCNGipZgxnpO7NTJCpUkjJtLgQnlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739555427; a=rsa-sha256; cv=none; b=HaNoJpqrUp6VOY3hj6EOEwT5yu7HZweLi7rnt3PtrzkRWz2xSzQovNgoCOcehTY02kZ7GE jX+0NOpjxG1a8BfpWqSQxeBnpj6XytFQ9E9Tf/mFT7vgDXAKO87reF1P5/titVO2oTnqfz 2YsBg6r4jtbFtDzwN0IiuCar+4TRkJUcpF5uLXYMImK7Ycoge2V0sDyxbikySspJbxzGhs cI+kjzw9j3QCi5JiMv7eyMJCXEMCY15AEs/07LrSJhMz6UmNLBpZIc1HyJD2a5ecz6/P4C sQQYhEX5PMA1gm2T/YAJwdm3OCDhFDWSxAB895ObpMhxQ7aPXY47shyjmwiqzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Yvfhz09SVzgxS; Fri, 14 Feb 2025 17:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51EHoQQf061414; Fri, 14 Feb 2025 17:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51EHoQEk061411; Fri, 14 Feb 2025 17:50:26 GMT (envelope-from git) Date: Fri, 14 Feb 2025 17:50:26 GMT Message-Id: <202502141750.51EHoQEk061411@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: a2614574f245 - main - pfctl: if_item can be "any" now 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a2614574f2459ef56013061a185880f90e035ce4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2614574f2459ef56013061a185880f90e035ce4 commit a2614574f2459ef56013061a185880f90e035ce4 Author: Kristof Provost AuthorDate: 2025-02-11 10:06:53 +0000 Commit: Kristof Provost CommitDate: 2025-02-14 17:47:52 +0000 pfctl: if_item can be "any" now Allows things like: block out on $someif received-on any to prevent packets to get forwarded to $someif. Obtained from: OpenBSD, henning , 5984d04852 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 981039f4124c..b370cbc463ae 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -3379,6 +3379,15 @@ if_item : STRING { $$->next = NULL; $$->tail = $$; } + | ANY { + $$ = calloc(1, sizeof(struct node_if)); + if ($$ == NULL) + err(1, "if_item: calloc"); + strlcpy($$->ifname, "any", sizeof($$->ifname)); + $$->not = 0; + $$->next = NULL; + $$->tail = $$; + } ; af : /* empty */ { $$ = 0; }