[PATCH 0/2] Fix regression when one IP version is disabled
Fix for a simple but nasty regression caused by the recent forwarding table work. Plus a tiny feature in adjacent code. Link: https://bugs.passt.top/show_bug.cgi?id=205 David Gibson (2): fwd_rule: Don't attempt dual stack listen()s if only one IP family fwd_rule: Allow parsing * as a forwarding address fwd_rule.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- 2.54.0
With the recent rework to forwarding configuration, we're stricter about
what forwarding rules we allow. In particular we don't allow dual stack
forwards (listening on both IPv4 and IPv6 addresses) if we only have one
IP family enabled.
This makes what I think was a pre-existing minor bug into a nasty failure.
If we use default forwards with no address specified, e.g.:
$ pasta -t 1234 -4
$ pasta -U 4321 -6
these are interpreted as dual-stack forwards. Previously these would be
applied, leading to a surprising dual stack socket. Since 0aeda87ca185,
they instead result in an immediate fatal error.
Add logic to interpret a default "any" address as only one IP family if
only one IP family is enabled.
Link: https://bugs.passt.top/show_bug.cgi?id=205
Reported-by:
In our output in various places, we use "*", or sometimes "[*]" to indicate
a dual stack unspecified address: that is a case where we listen on both
0.0.0.0 and ::. However we don't currently allow the same syntax when
specifying forwarding rules on the command line.
A * address can be indirectly specified by omitting the address entirely,
but for consistency allow an explicit "*" or "[*]" as well.
Signed-off-by: David Gibson
On Fri, 15 May 2026 18:24:32 +1000
David Gibson
Fix for a simple but nasty regression caused by the recent forwarding table work. Plus a tiny feature in adjacent code.
Link: https://bugs.passt.top/show_bug.cgi?id=205
David Gibson (2): fwd_rule: Don't attempt dual stack listen()s if only one IP family fwd_rule: Allow parsing * as a forwarding address
Applied. -- Stefano
participants (2)
-
David Gibson
-
Stefano Brivio