From: Willy Tarreau Date: Mon, 9 May 2022 14:18:26 +0000 (+0200) Subject: MINOR: tools: improve error message accuracy in str2sa_range X-Git-Tag: v2.6-dev10~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d31ab04383eb02358b9eff4b74b5e195e1484a0;p=thirdparty%2Fhaproxy.git MINOR: tools: improve error message accuracy in str2sa_range The error message when mixing stream and dgram protocols in an address speaks about sockets while it ought to speak about addresses, let's fix this as in some contexts it can be a bit confusing. --- diff --git a/src/tools.c b/src/tools.c index 34d8d022e2..ed3c3a6671 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1280,11 +1280,11 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int } if (ctrl_type == SOCK_STREAM && !(opts & PA_O_STREAM)) { - memprintf(err, "stream-type socket not acceptable in '%s'\n", str); + memprintf(err, "stream-type address not acceptable in '%s'\n", str); goto out; } else if (ctrl_type == SOCK_DGRAM && !(opts & PA_O_DGRAM)) { - memprintf(err, "dgram-type socket not acceptable in '%s'\n", str); + memprintf(err, "dgram-type address not acceptable in '%s'\n", str); goto out; }