diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-02-22 21:45:03 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-02-23 07:09:49 +0100 |
commit | 081eed3b67857215d4028d7ac25cbcdc73e06ecd (patch) | |
tree | 0bf90cfba66826053f162af99b68381f4ee463f2 /src/tools/config.c | |
parent | wg-quick: allow config files without trailing newline (diff) | |
download | wireguard-monolithic-historical-081eed3b67857215d4028d7ac25cbcdc73e06ecd.tar.xz wireguard-monolithic-historical-081eed3b67857215d4028d7ac25cbcdc73e06ecd.zip |
tools: give "off" value for fwmark
Diffstat (limited to 'src/tools/config.c')
-rw-r--r-- | src/tools/config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/config.c b/src/tools/config.c index b3384da..b9a65c1 100644 --- a/src/tools/config.c +++ b/src/tools/config.c @@ -97,6 +97,12 @@ static inline bool parse_fwmark(uint32_t *fwmark, unsigned int *flags, const cha char *end; int base = 10; + if (!strcasecmp(value, "off")) { + *fwmark = 0; + *flags |= WGDEVICE_REMOVE_FWMARK; + return true; + } + if (value[0] == '0' && value[1] == 'x') { value += 2; base = 16; |