Consolidated %any(6) host_t parsing

This commit is contained in:
Martin Willi
2012-11-29 10:22:52 +01:00
parent 98d0fd25a8
commit 7277e4719e
2 changed files with 14 additions and 12 deletions
@@ -234,14 +234,6 @@ METHOD(host_resolver_t, resolve, host_t*,
};
host_t *result;
if (streq(name, "%any") || streq(name, "0.0.0.0"))
{
return host_create_any(family ? family : AF_INET);
}
if (streq(name, "%any6") || streq(name, "::"))
{
return host_create_any(family ? family : AF_INET6);
}
if (family == AF_INET && strchr(name, ':'))
{ /* do not try to convert v6 addresses for v4 family */
return NULL;