]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tools: improve error message accuracy in str2sa_range
authorWilly Tarreau <w@1wt.eu>
Mon, 9 May 2022 14:18:26 +0000 (16:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 May 2022 14:50:00 +0000 (16:50 +0200)
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.

src/tools.c

index 34d8d022e25e5b4cefa3c987e1c409f8c961ff9f..ed3c3a667107be3ccd29ea4750626ef599e48e00 100644 (file)
@@ -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;
        }