diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-15 22:52:38 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-17 19:26:07 +0200 |
commit | 38e97ddeab325936f2498faeb3b6866f74cad285 (patch) | |
tree | c9cc1a3858ee54d65fbec45068daf3a7253f33d1 /src/tools/show.c | |
parent | tools: encoding: be more paranoid (diff) | |
download | wireguard-monolithic-historical-38e97ddeab325936f2498faeb3b6866f74cad285.tar.xz wireguard-monolithic-historical-38e97ddeab325936f2498faeb3b6866f74cad285.zip |
tools: 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.
Diffstat (limited to 'src/tools/show.c')
-rw-r--r-- | src/tools/show.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/show.c b/src/tools/show.c index 476d002..4203494 100644 --- a/src/tools/show.c +++ b/src/tools/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; } |