diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2026-03-22 06:20:48 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2026-03-22 06:20:48 +0000 |
| commit | 434e1c3d84135d1c3a6e578fdfa4b508f0914494 (patch) | |
| tree | 12a2739113591fff26ff49dfa4f5ab97e72f5820 | |
| parent | 343ace42f82a629374af4dc3a72da5f46f2c3feb (diff) | |
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")
| -rw-r--r-- | sbin/pfctl/tests/files/pf1079.in | 2 | ||||
| -rw-r--r-- | sbin/pfctl/tests/files/pf1079.ok | 1 | ||||
| -rw-r--r-- | sbin/pfctl/tests/pfctl_test_list.inc | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/sbin/pfctl/tests/files/pf1079.in b/sbin/pfctl/tests/files/pf1079.in new file mode 100644 index 000000000000..78a3f148f815 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1079.in @@ -0,0 +1,2 @@ +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 + diff --git a/sbin/pfctl/tests/files/pf1079.ok b/sbin/pfctl/tests/files/pf1079.ok new file mode 100644 index 000000000000..437e881855a1 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1079.ok @@ -0,0 +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 diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index ff51af7562d1..a2c64dfc0020 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -187,3 +187,4 @@ PFCTL_TEST(1075, "One shot rule") PFCTL_TEST(1076, "State limiter") PFCTL_TEST(1077, "Source limiter") PFCTL_TEST(1078, "New page") +PFCTL_TEST(1079, "rdr-to and nat-to") |
