From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: j.d03@cpc.cx, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 2/2] fwd_rule: Allow parsing * as a forwarding address
Date: Fri, 15 May 2026 18:24:34 +1000 [thread overview]
Message-ID: <20260515082434.630175-3-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20260515082434.630175-1-david@gibson.dropbear.id.au>
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 <david@gibson.dropbear.id.au>
---
fwd_rule.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fwd_rule.c b/fwd_rule.c
index cb37a990..04a0101d 100644
--- a/fwd_rule.c
+++ b/fwd_rule.c
@@ -709,7 +709,9 @@ void fwd_rule_parse(char optname, bool del, const char *optarg,
p++;
}
- if (!inany_pton(p, &addr_buf))
+ if (strcmp(p, "*") == 0)
+ addr = NULL;
+ else if (!inany_pton(p, &addr_buf))
die("Bad forwarding address '%s'", p);
}
} else {
--
2.54.0
prev parent reply other threads:[~2026-05-15 8:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 8:24 [PATCH 0/2] Fix regression when one IP version is disabled David Gibson
2026-05-15 8:24 ` [PATCH 1/2] fwd_rule: Don't attempt dual stack listen()s if only one IP family David Gibson
2026-05-15 8:24 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260515082434.630175-3-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=j.d03@cpc.cx \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).