From c41360d2bf6999301196b69b7802e30412d3d203 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 15 May 2026 15:34:04 +1000 Subject: fwd_rule: Allow parsing * as a forwarding address 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 --- fwd_rule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fwd_rule.c b/fwd_rule.c index cb37a99..04a0101 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 { -- cgit v1.2.3