Disable ipv6 when getnetconfigent("udp6"/"tcp6") fails.
Submitted by: Martin Blapp <mb@imp.ch>
This commit is contained in:
parent
5d8a28f3e1
commit
69444aa31b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74799
@ -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…
Reference in New Issue
Block a user