Skip to content

Commit 434e1c3

Browse files
committed
pfctl tests: test rdr-to and nat-to in one rule
OpenBSD fixed this separately (in their 6a338f3f70). We appear to not have had this bug, but test for it anyway. Sponsored by: Rubicon Communications, LLC ("Netgate")
1 parent 343ace4 commit 434e1c3

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

sbin/pfctl/tests/files/pf1079.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pass in on lo0 proto tcp from any to 1.2.3.4/32 port 2222 rdr-to 10.0.0.10 nat-to 10.0.0.2 port 22
2+

sbin/pfctl/tests/files/pf1079.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pass in on lo0 inet proto tcp from any to 1.2.3.4 port = 2222 flags S/SA keep state nat-to 10.0.0.2 port 22 rdr-to 10.0.0.10

sbin/pfctl/tests/pfctl_test_list.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,4 @@ PFCTL_TEST(1075, "One shot rule")
187187
PFCTL_TEST(1076, "State limiter")
188188
PFCTL_TEST(1077, "Source limiter")
189189
PFCTL_TEST(1078, "New page")
190+
PFCTL_TEST(1079, "rdr-to and nat-to")

0 commit comments

Comments
 (0)