aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2026-07-03 13:54:34 +1000
committerStefano Brivio <sbrivio@redhat.com>2026-07-04 13:13:54 +0200
commitcea54dd30936ff8a54fc191a4e44bf1739b8b912 (patch)
treecec34072351329b2b353f3157e546470111810c5
parente51a545f3b68b60c1488a13061fec54e01236e47 (diff)
downloadpasst-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar.gz
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar.bz2
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar.lz
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar.xz
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.tar.zst
passt-cea54dd30936ff8a54fc191a4e44bf1739b8b912.zip
conf: Use parameter instead of global in conf_nat()
conf_nat() takes a parameter @arg for the argument it's parsing. However on error we print instead optarg, the getopt() global. This happens to be the same thing at the time of the call, but it's not the right way to get to it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 4755a9f..6ab8efe 100644
--- a/conf.c
+++ b/conf.c
@@ -1049,7 +1049,7 @@ static void conf_nat(const char *arg, struct in_addr *addr4,
!IN4_IS_ADDR_MULTICAST(addr4))
return;
- die("Invalid address to remap to host: %s", optarg);
+ die("Invalid address to remap to host: %s", arg);
}
/**