The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7af7d6d61d416e0c2a340ca7f6d03b2c4bd631f7
commit 7af7d6d61d416e0c2a340ca7f6d03b2c4bd631f7 Author: Kristof Provost <[email protected]> AuthorDate: 2026-01-12 16:14:31 +0000 Commit: Kristof Provost <[email protected]> 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 <[email protected]>, 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;
