diff options
| author | Roy Marples <roy@marples.name> | 2020-11-11 17:41:16 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-11-11 17:41:16 +0000 |
| commit | 040561d61e157e7fb371f1311f0cee3536dee0d2 (patch) | |
| tree | 162dea972f50117b6a17790f26ea8e50893905e0 /src/dhcpcd.c | |
| parent | c49db0e1ced7c95d49fb6c844b918cf6ca899d4f (diff) | |
| download | dhcpcd-040561d61e157e7fb371f1311f0cee3536dee0d2.tar.xz | |
control: create an unpriv socket for non master mode
This allows `dhcpcd -U4 eth0` to work once more.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index f106abd9..7377fcc6 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -2179,6 +2179,9 @@ printpidfile: if (!(ctx.options & DHCPCD_MASTER)) ctx.control_fd = control_open(argv[optind], family, ctx.options & DHCPCD_DUMPLEASE); + if (!(ctx.options & DHCPCD_MASTER) && ctx.control_fd == -1) + ctx.control_fd = control_open(argv[optind], AF_UNSPEC, + ctx.options & DHCPCD_DUMPLEASE); if (ctx.control_fd == -1) ctx.control_fd = control_open(NULL, AF_UNSPEC, ctx.options & DHCPCD_DUMPLEASE); |
