Use SOCK_CLOEXEC.
MFC after: 1 week
This commit is contained in:
parent
28b9e53b7d
commit
cfaa2a0955
@ -1589,7 +1589,7 @@ is_ifdisabled(char *name)
|
||||
struct in6_ndireq nd;
|
||||
int fd;
|
||||
|
||||
if ((fd = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
|
||||
if ((fd = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0)
|
||||
return -1;
|
||||
memset(&nd, 0, sizeof(nd));
|
||||
strlcpy(nd.ifname, name, sizeof(nd.ifname));
|
||||
|
Loading…
Reference in New Issue
Block a user