summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-05-19 16:19:05 +0100
committerRoy Marples <roy@marples.name>2020-05-19 16:19:05 +0100
commitc5445ce8235c153f4f184067ef58249f598d8629 (patch)
treeb16a5c64baf8b7e6ecfcf1f09cf38d13aa68ff09 /src/ipv6.c
parentd2fec927e001f2430bb8d5127403968f23b9c316 (diff)
downloaddhcpcd-c5445ce8235c153f4f184067ef58249f598d8629.tar.xz
privsep: Enable Capsicum for all processes.
Except for the priviledged process. This is quite an in-depth change: * ARP is now one process per address * BPF flags are now returned via privsep * BPF write filters are locked when supported * The root process sends to the network The last step is done by opening RAW sockets and then sending a UDP header (where applicable) to avoid binding to an address which is already in use by the reader sockets. This is slightly wasteful for OS's without sandboxing but does have the very nice side effect of not needing a source address to unicast DHCPs replies from which makes the code smaller.
Diffstat (limited to 'src/ipv6.c')
-rw-r--r--src/ipv6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index 42994250..9e3b62f6 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -140,7 +140,10 @@ ipv6_init(struct dhcpcd_ctx *ctx)
#ifndef __sun
ctx->nd_fd = -1;
#endif
- ctx->dhcp6_fd = -1;
+#ifdef DHCP6
+ ctx->dhcp6_rfd = -1;
+ ctx->dhcp6_wfd = -1;
+#endif
return 0;
}