diff options
| author | Roy Marples <roy@marples.name> | 2020-03-28 17:01:49 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-03-28 17:01:49 +0000 |
| commit | 1563721be07d6195642ebd1e64e98229dbcec6c3 (patch) | |
| tree | 131e38cbcbe18b742714c9845301e4bdac462e98 /src/dhcpcd.c | |
| parent | 2f13d5993e40d391943af981c0115603f2c56e65 (diff) | |
| download | dhcpcd-1563721be07d6195642ebd1e64e98229dbcec6c3.tar.xz | |
dhcpcd: dump lease on the unpriviledged socket
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index de72d954..057a1fd9 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1679,6 +1679,8 @@ again3: } else if (dp[1] == 'd' && isdigit((unsigned char)dp[2])) print = true; + else + print = false; } else print = false; while (dp < de && *dp != '\0') { @@ -2018,9 +2020,11 @@ printpidfile: #endif ctx.options |= DHCPCD_FORKED; /* avoid socket unlink */ if (!(ctx.options & DHCPCD_MASTER)) - ctx.control_fd = control_open(argv[optind]); + ctx.control_fd = control_open(argv[optind], + ctx.options & DHCPCD_DUMPLEASE); if (ctx.control_fd == -1) - ctx.control_fd = control_open(NULL); + ctx.control_fd = control_open(NULL, + ctx.options & DHCPCD_DUMPLEASE); if (ctx.control_fd != -1) { if (!(ctx.options & DHCPCD_DUMPLEASE)) loginfox("sending commands to dhcpcd process"); |
