]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pfctl: fix incorrect mask on dynamic address
authorKristof Provost <kp@FreeBSD.org>
Fri, 6 Oct 2023 12:20:17 +0000 (14:20 +0200)
committerKristof Provost <kp@FreeBSD.org>
Fri, 27 Oct 2023 07:46:19 +0000 (09:46 +0200)
commitdfaadbb4661de6d1a410205bf1e6653ca24f7610
tree78b9f9bf225f2fddf6be7201f092d5398b9534e8
parent4e24a146dca44b84a29bffc52e346ae6a6f5da51
pfctl: fix incorrect mask on dynamic address

A PF rule using an IPv4 address followed by an IPv6 address and then a
dynamic address, e.g. "pass from {192.0.2.1 2001:db8::1} to (pppoe0)",
will have an incorrect /32 mask applied to the dynamic address.

MFC after: 3 weeks
Obtained from: OpenBSD
See also: https://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/007_pfctl.patch.sig
Sponsored by: Rubicon Communications, LLC ("Netgate")
Event: Oslo Hackathon at Modirum

(cherry picked from commit 7ce98cf2f87a22240b66e4c38fd887431a25bf7d)
sbin/pfctl/parse.y
sbin/pfctl/pfctl_parser.c
sbin/pfctl/pfctl_parser.h
sbin/pfctl/tests/files/pf0102.ok
sbin/pfctl/tests/files/pf1018.in [new file with mode: 0644]
sbin/pfctl/tests/files/pf1018.ok [new file with mode: 0644]
sbin/pfctl/tests/pfctl_test_list.inc