diff options
| author | Roy Marples <roy@marples.name> | 2019-12-10 21:00:58 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-12-10 21:00:58 +0000 |
| commit | 3e7c15812949098cdf5f1a92d4577ed8e80b5764 (patch) | |
| tree | c5ea716fb398af9892c779107328c5f4b7ea5a24 /src/privsep.h | |
| parent | 0cd6baf3be2301aed1bbc6347f48febbd4e7e600 (diff) | |
| download | dhcpcd-3e7c15812949098cdf5f1a92d4577ed8e80b5764.tar.xz | |
privsep: Enable ARP BPF filtering for interesting addresses
This brings parity with non privsep features.
Aside from the lack of Solaris support, but that's another day.
Diffstat (limited to 'src/privsep.h')
| -rw-r--r-- | src/privsep.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/privsep.h b/src/privsep.h index 85804a6d..02c06c4d 100644 --- a/src/privsep.h +++ b/src/privsep.h @@ -40,6 +40,7 @@ #define PS_DHCP6 0x03 #define PS_BPF_BOOTP 0x04 #define PS_BPF_ARP 0x05 +#define PS_BPF_ARP_ADDR 0x06 #define PS_IOCTL 0x10 #define PS_SCRIPT 0x11 @@ -47,6 +48,7 @@ #define PS_ROUTE 0x13 /* Also used for NETLINK */ #define PS_WRITEPATHUINT 0x14 +#define PS_DELETE 0x20 #define PS_START 0x40 #define PS_STOP 0x80 @@ -57,6 +59,12 @@ CMSG_SPACE(sizeof(struct in6_pktinfo) + \ sizeof(int))) +/* Handy macro to work out if in the privsep engine or not. */ +#define IN_PRIVSEP(ctx) \ + ((ctx)->options & DHCPCD_PRIVSEP) +#define IN_PRIVSEP_SE(ctx) \ + (((ctx)->options & (DHCPCD_PRIVSEP | DHCPCD_FORKED)) == DHCPCD_PRIVSEP) + #include "config.h" #include "arp.h" #include "dhcp.h" |
