Respect given address family when resolving "%any"
This commit is contained in:
@@ -367,9 +367,13 @@ host_t *host_create_from_string_and_family(char *string, int family,
|
|||||||
struct sockaddr_in6 v6;
|
struct sockaddr_in6 v6;
|
||||||
} addr;
|
} addr;
|
||||||
|
|
||||||
|
if (streq(string, "%any"))
|
||||||
|
{
|
||||||
|
return host_create_any_port(family ? family : AF_INET, port);
|
||||||
|
}
|
||||||
if (family == AF_UNSPEC || family == AF_INET)
|
if (family == AF_UNSPEC || family == AF_INET)
|
||||||
{
|
{
|
||||||
if (streq(string, "%any") || streq(string, "0.0.0.0"))
|
if (streq(string, "%any4") || streq(string, "0.0.0.0"))
|
||||||
{
|
{
|
||||||
return host_create_any_port(AF_INET, port);
|
return host_create_any_port(AF_INET, port);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user