summaryrefslogtreecommitdiffstats
path: root/src/privsep-inet.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-06-01 18:59:08 +0100
committerRoy Marples <roy@marples.name>2020-06-01 18:59:08 +0100
commitcd1a2992260deed8a669c4dfdbb599409330c08a (patch)
treeece7f44e4b311a0a8b88aa22ba28ee6cde55d6a3 /src/privsep-inet.c
parentb9d8f464fead880828b2e3a9ea79a70767aa0207 (diff)
downloaddhcpcd-cd1a2992260deed8a669c4dfdbb599409330c08a.tar.xz
privsep: Only open raw sockets for the needed protocols.
Just warn about any errors rather than forcing an early exit as well. While here, fix startup if DHCPv6 disabled globally but enabled per if.
Diffstat (limited to 'src/privsep-inet.c')
-rw-r--r--src/privsep-inet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/privsep-inet.c b/src/privsep-inet.c
index 8bf0474c..48fb19a2 100644
--- a/src/privsep-inet.c
+++ b/src/privsep-inet.c
@@ -170,8 +170,8 @@ ps_inet_startcb(void *arg)
}
#endif
#ifdef DHCP6
- if ((ctx->options & (DHCPCD_DHCP6 | DHCPCD_MASTER)) ==
- (DHCPCD_DHCP6 | DHCPCD_MASTER))
+ if ((ctx->options & (DHCPCD_IPV6 | DHCPCD_MASTER)) ==
+ (DHCPCD_IPV6 | DHCPCD_MASTER))
{
ctx->dhcp6_rfd = dhcp6_openudp(0, NULL);
if (ctx->dhcp6_rfd == -1)