Skip to content

Commit

Permalink
Revert "privsep: shutdown read end of the write only sockets"
Browse files Browse the repository at this point in the history
Fails noisly on Linux.

This reverts commit 5fc20ae.
  • Loading branch information
rsmarples committed Aug 3, 2020
1 parent 261009b commit a73da9e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/privsep-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ ps_root_startcb(void *arg)
ctx->ps_root_pid = getpid();
ctx->options |= DHCPCD_PRIVSEPROOT;

/* Open network sockets for sending only.
/* Open network sockets for sending.
* This is a small bit wasteful for non sandboxed OS's
* but makes life very easy for unicasting DHCPv6 in non master
* mode as we no longer care about address selection. */
Expand All @@ -645,26 +645,20 @@ ps_root_startcb(void *arg)
SOCK_RAW | SOCK_CXNB, IPPROTO_UDP);
if (ctx->udp_wfd == -1)
logerr("%s: dhcp_openraw", __func__);
else if (shutdown(ctx->udp_wfd, SHUT_RD) == -1)
logerr("%s: shutdown dhcp", __func__);
}
#endif
#ifdef INET6
if (ctx->options & DHCPCD_IPV6) {
ctx->nd_fd = ipv6nd_open(false);
if (ctx->nd_fd == -1)
logerr("%s: ipv6nd_open", __func__);
else if (shutdown(ctx->nd_fd, SHUT_RD) == -1)
logerr("%s: shutdown nd", __func__);
}
#endif
#ifdef DHCP6
if (ctx->options & DHCPCD_IPV6) {
ctx->dhcp6_wfd = dhcp6_openraw();
if (ctx->dhcp6_wfd == -1)
logerr("%s: dhcp6_openraw", __func__);
else if (shutdown(ctx->dhcp6_wfd, SHUT_RD) == -1)
logerr("%s: shutdown dhcp6", __func__);
}
#endif

Expand Down

0 comments on commit a73da9e

Please sign in to comment.