Disable ipv6 when getnetconfigent("udp6"/"tcp6") fails.
Submitted by: Martin Blapp <mb@imp.ch>
This commit is contained in:
parent
c7987ad371
commit
20ed2193f0
@ -256,7 +256,8 @@ main(argc, argv, envp)
|
||||
ip6flag = 1;
|
||||
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (s < 0 && (errno == EPROTONOSUPPORT ||
|
||||
errno == EPFNOSUPPORT || errno == EAFNOSUPPORT))
|
||||
errno == EPFNOSUPPORT || errno == EAFNOSUPPORT) ||
|
||||
(getnetconfigent("udp6") == NULL && getnetconfigent("tcp6") == NULL))
|
||||
ip6flag = 0;
|
||||
else
|
||||
close(s);
|
||||
|
@ -256,7 +256,8 @@ main(argc, argv, envp)
|
||||
ip6flag = 1;
|
||||
s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (s < 0 && (errno == EPROTONOSUPPORT ||
|
||||
errno == EPFNOSUPPORT || errno == EAFNOSUPPORT))
|
||||
errno == EPFNOSUPPORT || errno == EAFNOSUPPORT) ||
|
||||
(getnetconfigent("udp6") == NULL && getnetconfigent("tcp6") == NULL))
|
||||
ip6flag = 0;
|
||||
else
|
||||
close(s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user