aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/show.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-02-22 21:45:03 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-02-23 07:09:49 +0100
commit081eed3b67857215d4028d7ac25cbcdc73e06ecd (patch)
tree0bf90cfba66826053f162af99b68381f4ee463f2 /src/tools/show.c
parentwg-quick: allow config files without trailing newline (diff)
downloadwireguard-monolithic-historical-081eed3b67857215d4028d7ac25cbcdc73e06ecd.tar.xz
wireguard-monolithic-historical-081eed3b67857215d4028d7ac25cbcdc73e06ecd.zip
tools: give "off" value for fwmark
Diffstat (limited to 'src/tools/show.c')
-rw-r--r--src/tools/show.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/show.c b/src/tools/show.c
index c20d858..6cf2b23 100644
--- a/src/tools/show.c
+++ b/src/tools/show.c
@@ -276,7 +276,10 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int
} else if (!strcmp(param, "fwmark")) {
if (with_interface)
printf("%s\t", device->interface);
- printf("0x%x\n", device->fwmark);
+ if (device->fwmark)
+ printf("0x%x\n", device->fwmark);
+ else
+ printf("off\n");
} else if (!strcmp(param, "endpoints")) {
if (with_interface)
printf("%s\t", device->interface);