Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2026 08:06:13 +0000
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7af7d6d61d41 - main - pfctl: distinguish broadcast and PPP peer addresses
Message-ID:  <69674e75.b93b.492500fb@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=7af7d6d61d416e0c2a340ca7f6d03b2c4bd631f7

commit 7af7d6d61d416e0c2a340ca7f6d03b2c4bd631f7
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-01-12 16:14:31 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-01-14 06:44:42 +0000

    pfctl: distinguish broadcast and PPP peer addresses
    
    pfctl_parser.c, ifa_load() should distinguish between broadcast
    and PPP peer address when it populates interface table for rule
    parser.
    
    OK @claudio, OK @dlg
    
    Obtained from:  OpenBSD, sashan <sashan@openbsd.org>, 2e871bec67
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/pfctl_parser.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 233f5d641d2c..f85c50652944 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1598,14 +1598,15 @@ ifa_load(void)
 			copy_satopfaddr(&n->addr.v.a.addr, ifa->ifa_addr);
 			ifa->ifa_netmask->sa_family = ifa->ifa_addr->sa_family;
 			copy_satopfaddr(&n->addr.v.a.mask, ifa->ifa_netmask);
-			if (ifa->ifa_broadaddr != NULL &&
+			if (ifa->ifa_flags & IFF_BROADCAST &&
+			    ifa->ifa_broadaddr != NULL &&
 			    ifa->ifa_broadaddr->sa_len != 0) {
 				ifa->ifa_broadaddr->sa_family =
 				    ifa->ifa_addr->sa_family;
 				ifa->ifa_broadaddr->sa_family = ifa->ifa_addr->sa_family;
 				copy_satopfaddr(&n->bcast, ifa->ifa_broadaddr);
-			}
-			if (ifa->ifa_dstaddr != NULL &&
+			} else if (ifa->ifa_flags & IFF_POINTOPOINT &&
+			    ifa->ifa_dstaddr != NULL &&
 			    ifa->ifa_dstaddr->sa_len != 0) {
 				ifa->ifa_dstaddr->sa_family =
 				    ifa->ifa_addr->sa_family;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69674e75.b93b.492500fb>