MINOR: tools: Add support for QUIC addresses parsing.

Add "quic4" and "quic6" keywords to str2sa_range() to parse QUIC IPv4
and IPv6 addresses respectively.
This commit is contained in:
Frdric Lcaille 2020-11-23 11:36:57 +01:00 committed by Willy Tarreau
parent e50afbd4e4
commit 10caf65634

View File

@ -950,6 +950,18 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int
ss.ss_family = AF_UNSPEC;
sock_type = ctrl_type = SOCK_DGRAM;
}
else if (strncmp(str2, "quic4@", 6) == 0) {
str2 += 6;
ss.ss_family = AF_INET;
sock_type = SOCK_DGRAM;
ctrl_type = SOCK_STREAM;
}
else if (strncmp(str2, "quic6@", 6) == 0) {
str2 += 6;
ss.ss_family = AF_INET6;
sock_type = SOCK_DGRAM;
ctrl_type = SOCK_STREAM;
}
else if (strncmp(str2, "fd@", 3) == 0) {
str2 += 3;
ss.ss_family = AF_CUST_EXISTING_FD;