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 | 3ac9885e95854fd82dc498fbc3871a04b5ed1c69 (patch) | |
| tree | c5ea716fb398af9892c779107328c5f4b7ea5a24 /src/dhcpcd.c | |
| parent | e02016b276ef1dbd02f02ba0b1c9a0e71639f28b (diff) | |
| download | dhcpcd-3ac9885e95854fd82dc498fbc3871a04b5ed1c69.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/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index fefe3c94..6a3b86f5 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1538,14 +1538,18 @@ static void dhcpcd_fork_cb(void *arg) { struct dhcpcd_ctx *ctx = arg; - int exit_code = EXIT_FAILURE; + int exit_code; ssize_t len; len = read(ctx->fork_fd, &exit_code, sizeof(exit_code)); - if (len == -1) + if (len == -1) { logerr(__func__); - else if ((size_t)len < sizeof(exit_code)) - logerr("%s: truncated read", __func__); + exit_code = EXIT_FAILURE; + } else if ((size_t)len < sizeof(exit_code)) { + logerrx("%s: truncated read %zd (expected %zu)", + __func__, len, sizeof(exit_code)); + exit_code = EXIT_FAILURE; + } eloop_exit(ctx->eloop, exit_code); } |
