Thread View: muc.lists.freebsd.bugs
3 messages
3 total messages
Started by bugzilla-noreply
Mon, 30 Nov 2026 01:57
[Bug 301277] NAT pool behavior change from FreeBSD 14 -> 15 with IPv6
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 01:57
Date: Mon, 30 Nov 2026 01:57
69 lines
4366 bytes
4366 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301277
Bug ID: 301277
Summary: NAT pool behavior change from FreeBSD 14 -> 15 with
IPv6
Product: Base System
Version: 15.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: steve.kerrison@jcu.edu.au
The changes to pf introduced between FreeBSD 14 and 15 have created
inconsistencies in the behavior of NAT in IPv6. When the target of a
translation is a dynamic interface's network `(iface:network...)`, source-hash
and random pools no longer target the full supplied subnet, but only the base
address of the network.
The simplest example is, for:
nat on $b_if inet6 from 2001:db8:aaaa::/56 to !2001:db8:aaaa::/56 ->
($pd_if:network:0) source-hash
Where $pd_if has 2001:db8:ffff::1/64 assigned to it, in 14.x, translated
addresses originating from 2001:db8:aaaa::/56 will NAT to addresses throughout
2001:db8:ffff:: -- 2001:db8:ffff::ffff:ffff:ffff:ffff as one would expect. On
15.x, *all* translated addresses use 2001:db8:ffff::
This is the case for both source-hash and random, whereas round-robin still
works.
I've produced a script to test this against a pair of fresh VMs, each with
three network interfaces, the 'WAN' side of which must be connected together,
but the others just need to be up and assigned addresses by the script. I've
also included the output of my tests from this script with a 14.4 and 15.1
release. I will test on 15.2-RC1 shortly as well.
The test code and my results are in this repo:
https://github.com/stevekerrison/freebsd-pf-snat-bug
My testing also exposes some changes in previously erroneous configurations,
that now work but may not be working as expected. My particular use case was
using (iface:network:0) but I expanded my test to include all forms of
:network, dynamic and static, with and without extra alias addresses assigned
to the interface. The results table from my tests is inlined below.
This bug was discovered while using OPNsense
(https://github.com/opnsense/src/issues/359), but my testing was since done in
FreeBSD.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 301277] NAT pool behavior change from FreeBSD 14 -> 15 with IPv6
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 01:59
Date: Mon, 30 Nov 2026 01:59
135 lines
7970 bytes
7970 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301277
--- Comment #1 from Steve Kerrison <steve.kerrison@jcu.edu.au> ---
The test results were:
| Test | Description | Aliases? | 14.4
| 15.1 |
Consistent? |
| ---- | ----------------------------- | -------- |
------------------------------------------ |
------------------------------------------------- | ----------- |
| 1 | (iface:network:0) source-hash | No | Works
| Masked | 0
|
| 2 | (iface:network:0) round-robin | No | Works
| Works | 1
|
| 3 | (iface:network:0) random | No | Works
| Masked | 0
|
| 4 | (iface:network) source-hash | No | Invalid (iface only
supported in RR) | Masked | 0
|
| 5 | (iface:network) round robin | No | Works
| Works | 1
|
| 6 | (iface:network) random | No | Invalid (iface only
supported in RR) | Masked | 0
|
| 7 | iface:network:0 source-hash | No | Works
| Works | 1
|
| 8 | iface:network:0 round-robin | No | Works
| Works | 1
|
| 9 | iface:network:0 random | No | Works
| Works | 1
|
| 10 | iface:network source-hash | No | Works
| Works | 1
|
| 11 | iface:network round robin | No | Works
| Works | 1
|
| 12 | iface:network random | No | Works
| Works | 1
|
| 13 | (iface:network:0) source-hash | Yes | Works
| Masked | 0
|
| 14 | (iface:network:0) round-robin | Yes | Works
| Works | 1
|
| 15 | (iface:network:0) random | Yes | Works
| Masked | 0
|
| 16 | (iface:network) source-hash | Yes | Invalid (iface only
supported in RR) | Masked (alias) | 0
|
| 17 | (iface:network) round robin | Yes | Works
| Works (alias) | 0
|
| 18 | (iface:network) random | Yes | Invalid (iface only
supported in RR) | Masked (alias) | 0
|
| 19 | iface:network:0 source-hash | Yes | Works
| Works | 1
|
| 20 | iface:network:0 round-robin | Yes | Works
| Works | 1
|
| 21 | iface:network:0 random | Yes | Works
| Works | 1
|
| 22 | iface:network source-hash | Yes | Invalid (multi-redirect
addresses RR only) | Invalid (r.route.opts must be PF_POOL_ROUNDROBIN) | 0
|
| 23 | iface:network round robin | Yes | Works (alias)
| Works (alias) | 1
|
| 24 | iface:network random | Yes | Invalid (multi-redirect
addresses RR only) | Invalid (r.route.opts must be PF_POOL_ROUNDROBIN) | 0
|
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
[Bug 301277] NAT pool behavior change from FreeBSD 14 -> 15 with IPv6
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:06
Date: Mon, 30 Nov 2026 02:06
17 lines
2565 bytes
2565 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301277
Mark Linimon <linimon@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |regression
Assignee|bugs@FreeBSD.org |net@FreeBSD.org
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads