diff options
Diffstat (limited to 'src/rpcbind.c')
-rw-r--r-- | src/rpcbind.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rpcbind.c b/src/rpcbind.c index e23a957..35c45f5 100644 --- a/src/rpcbind.c +++ b/src/rpcbind.c @@ -475,11 +475,13 @@ init_transport(struct netconfig *nconf) nconf->nc_netid); return (1); } + + hints.ai_flags &= ~AI_NUMERICHOST; switch (hints.ai_family) { case AF_INET: if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; + hints.ai_flags |= AI_NUMERICHOST; } else { /* * Skip if we have an AF_INET6 adress. @@ -492,7 +494,7 @@ init_transport(struct netconfig *nconf) case AF_INET6: if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; + hints.ai_flags |= AI_NUMERICHOST; } else { /* * Skip if we have an AF_INET adress. |