From 72644a625041b440c3d37d2410d32ee12cf52df8 Mon Sep 17 00:00:00 2001 From: hev Date: Sun, 19 May 2024 13:15:30 +0800 Subject: [PATCH] HevConf: Accepts fwmark values in multiple bases. --- README.md | 2 +- src/hev-conf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 68447a8..6ca4209 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Options: -s [:port] domain name or address of STUN server -h [:port] domain name or address of HTTP server -e script path for notify mapped address - -f fwmark value + -f fwmark value (hex: 0x1, dec: 1, oct: 01) Bind options: -b port number for binding diff --git a/src/hev-conf.c b/src/hev-conf.c index d9fa58d..4afaccd 100644 --- a/src/hev-conf.c +++ b/src/hev-conf.c @@ -53,7 +53,7 @@ hev_conf_help (void) " -s [:port] domain name or address of STUN server\n" " -h [:port] domain name or address of HTTP server\n" " -e script path for notify mapped address\n" - " -f fwmark value\n" + " -f fwmark value (hex: 0x1, dec: 1, oct: 01)\n" "\n" "Bind options:\n" " -b port number for binding\n" @@ -98,7 +98,7 @@ hev_conf_init (int argc, char *argv[]) path = optarg; break; case 'f': - mark = strtoul (optarg, NULL, 16); + mark = strtoul (optarg, NULL, 0); break; case 'b': bport = optarg;