summaryrefslogtreecommitdiffstats
path: root/plugins/netutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r--plugins/netutils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c
index dc679e2a..60410c64 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -326,11 +326,11 @@ is_host (char *address)
326int 326int
327is_addr (char *address) 327is_addr (char *address)
328{ 328{
329 if (is_inet_addr (address)) 329 if (is_inet_addr (address) && address_family != AF_INET6)
330 return (TRUE); 330 return (TRUE);
331 331
332#ifdef USE_IPV6 332#ifdef USE_IPV6
333 if (is_inet6_addr (address)) 333 if (is_inet6_addr (address) && address_family != AF_INET)
334 return (TRUE); 334 return (TRUE);
335#endif 335#endif
336 336
@@ -374,7 +374,7 @@ int
374is_hostname (char *s1) 374is_hostname (char *s1)
375{ 375{
376#ifdef USE_IPV6 376#ifdef USE_IPV6
377 return resolve_host_or_addr (s1, AF_UNSPEC); 377 return resolve_host_or_addr (s1, address_family);
378#else 378#else
379 return resolve_host_or_addr (s1, AF_INET); 379 return resolve_host_or_addr (s1, AF_INET);
380#endif 380#endif