aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/show.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-15 22:52:38 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commit085796b2107a4acc2dc3b7caa4eecede88af2c06 (patch)
treeb1c45569519db405a0dd57059786ec16d85c41f2 /src/show.c
parentwg: encoding: be more paranoid (diff)
downloadwireguard-tools-085796b2107a4acc2dc3b7caa4eecede88af2c06.tar.xz
wireguard-tools-085796b2107a4acc2dc3b7caa4eecede88af2c06.zip
wg: retry resolution except when fatal
The reference to this is <https://sourceware.org/glibc/wiki/NameResolver>, which mentions: "From the perspective of the application that calls getaddrinfo() it perhaps doesn't matter that much since EAI_FAIL, EAI_NONAME and EAI_NODATA are all permanent failure codes and the causes are all permanent failures in the sense that there is no point in retrying later." This should cover more early-boot situations. While we're at it, we clean up the logic a bit so that we don't have a retry message on the final non-retrying attempt. We also peer into errno when receiving EAI_SYSTEM, to report to the user what actually happened. Also, fix the quoting back tick front tick mess. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/show.c')
-rw-r--r--src/show.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/show.c b/src/show.c
index 476d002..4203494 100644
--- a/src/show.c
+++ b/src/show.c
@@ -352,7 +352,7 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int
} else if (!strcmp(param, "dump"))
dump_print(device, with_interface);
else {
- fprintf(stderr, "Invalid parameter: `%s`\n", param);
+ fprintf(stderr, "Invalid parameter: `%s'\n", param);
show_usage();
return false;
}