summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2017-10-18Typo, from Hiltjo Posthuma.Martin Pieuchot
2017-10-17add missing HISTORY; based on CVS logs and release announcementsIngo Schwarze
2017-10-17Do not print an extra line if the 'get' command succeeds.Martin Pieuchot
Fix a regression introduced in previous.
2017-10-16Print the correct message and return an error code when no route entryMartin Pieuchot
matches the corresponding RTM_GET request. Based on a submission from Julien Dhaille, ok bluhm@
2017-10-16Sort & update syntax comments to match code. SortKenneth R Westerback
TOK_* case:'s alphabetically to make it easier to find things.
2017-10-16Bring parse_reject_statement() into line byKenneth R Westerback
returning 0/1 for success, etc. Simplify it by only supporting a single ip address per statement, as dhclient.conf(5) states. Don't add duplicate addresses to the reject list.
2017-10-14Whitespace fix.Kenneth R Westerback
2017-10-14Refactor parsing of hex sequences. Rename parse_X()Kenneth R Westerback
to parse_hex_octets() and have it return 0/1 to indicate success, to not touch existing data on error paths, to handle ';' better, emit single error message ("expecting colon delimited list of hex octets."). Fold parse_hex() into parse_hex_octets(). Simplify logic in parse_option_decl() to eliminate duplicate overflow error checking and error messages as a result.
2017-10-14Tweak parse_option_list() to return 0/1 to indicate success,Kenneth R Westerback
to not touch existing data on error paths, to handle ';' better, emit single error message ("expecting comma delimited list of option names.").
2017-10-13Tweak parse_option_decl() to return 0/1 to indicate success,Kenneth R Westerback
to not touch existing data on error paths, to handle ';' better.
2017-10-12Don't leak string that overflows the option data buffer.Kenneth R Westerback
2017-10-12Stop leaks of SSID strings. Whitespace fix.Kenneth R Westerback
2017-10-12Make parse_string() toe the new line by returningKenneth R Westerback
0 for failure, 1 for success, emitting a single error message ("expecting string.") and handling ';' better. Don't leak memory when encountering pathological config or lease files containing repeated instances of an option or command with string data.
2017-10-11Works better when both files in a diff areKenneth R Westerback
committed.
2017-10-11Eliminate unneeded intermediate variable. FixKenneth R Westerback
some 'return;'s that should be 'break;'s.
2017-10-11Tweak parse_date() again, this time to factorKenneth R Westerback
code in the same way as the other parse_*() functions. Whitespace fix in comment while passing. Also conform to idiom that original data is not changed in the error path.
2017-10-11Tweak parse_decimal() and its invocations to emit aKenneth R Westerback
single error message ("expecting integer between x and y") and to properly handle ';' in error cases.
2017-10-11Repair printing of classless-static-routes to leasesKenneth R Westerback
file. Broken due to incorrect translation from a netmask to the count of leading 1's. Use brute force counting until something better is found. Issue discovered and diffs tested by Anthony Coulter via bugs@. Thanks!
2017-10-10Tweak parse_boolean() to be more like its friends.Kenneth R Westerback
i.e. handle ';' better, and issue error message ("expecting boolean.") itself.
2017-10-10Tweak parse_cidr() to be more like its friends.Kenneth R Westerback
i.e. handle ';' better, and issue only one error message ("expecting IPv4 CIDR block"). One gratuitous whitespace tweak tossed in.
2017-10-09Tweak parse_lease_time() to emit a single message onKenneth R Westerback
failure ("expecting unsigned 32-bit decimal value") and to properly handle the terminating ';' in error situations. Make parse_lease_time() return an int to indicate success or failure as its friends do. Also avoid swapping endianess twice. Use == 1 vs != 0 when checking parse_ip_addr() return value.
2017-10-09Tweak parse_ip_addr() to emit a single message onKenneth R Westerback
failure ("expecting IPv4 address") and to properly handle the terminating ';' in error situations.
2017-10-08Simply parse_date() by trusting strptime() more and omittingKenneth R Westerback
pointlessly precise error messages in favour of 'expecting UTC time'.
2017-10-05tables.c was unhooked from the build a while ago.Kenneth R Westerback
2017-10-05'DENY' is a dhcpd-only thing. No need to parse it inKenneth R Westerback
dhclient.conf.
2017-09-29don't be silent on auto-allocation failure in write mode. ok millert@ krw@Otto Moerbeek
2017-09-28Correct the timeout used when select-timeout isKenneth R Westerback
set to a non-zero value in dhclient.conf(5). Fixes the bsd.rd upgrade issue reported by Eivinde Eide via misc@.
2017-09-26- pfctl always prints warning when flushes rulesetAlexandr Nedvedicky
OK mikeb@
2017-09-22Remove the '-u' command line option toKenneth R Westerback
ignore offers containing unknown DHCP options. Broken in 2013 and nobody noticed. ok mpi@
2017-09-21Shorten and otherwise tweak the verbiageKenneth R Westerback
around packet -> lease processing.
2017-09-21Fix '-u' option (reject offers that include unknownKenneth R Westerback
DHCP options). Broken by r1.204, 4 years, 8 months ago.
2017-09-20Fix some spacing. A couple of log_warx() -> log_warn() toKenneth R Westerback
use standard error messages for malloc errors.
2017-09-20Tweak, shorten, use more consistant verbiage.Kenneth R Westerback
2017-09-20Make log messages more informative by using theKenneth R Westerback
name of the function that failed and the significant parameters. Distinguish between poll() errors and problematic revents values.
2017-09-20Use consistant simple verbiage when SIOC* ioctl's fail.Kenneth R Westerback
2017-09-20Wrong captilization, long lines.Kenneth R Westerback
2017-09-20Remove stray %s/ifi->name from fatalx().Kenneth R Westerback
2017-09-20Make send_packet() log entries more informative byKenneth R Westerback
providing the name of the packet type that causes an error.
2017-09-20Nuke a few extraneous blanks.Kenneth R Westerback
2017-09-19Make send_packet() usage consistent. i.e. don't exitKenneth R Westerback
if send_packet(DISCOVER) fails. Distinguish between writev() and sendmsg() errors in send_packet() log messages. Check for short writes no matter how the packet is output. Return failure in this occurs. Check results of all send_packet() calls. If send_packet() fails, don't log that the DHCP message was sent.
2017-09-19flush_unpriv_ibuf() is now used only once so noKenneth R Westerback
need to complicate things by passing it a string identifying where it was called. Tweak log verbiage.
2017-09-18Check for failures of exchange_establish_p{1,2}() and call the givenMartin Pieuchot
`finalize' function with the `fail' argument when this happen. Introduce some sanity checks in exchange_free() to be able to call if even if the data structure isn't completely initialized. Plug memory leaks when exchange_establish() fails. While here fix a double free in one of the error paths. Based on a diff from hshoexer@, ok stsp@, markus@
2017-09-18Missed a log_warnx(). Nuke an extraneous space.Kenneth R Westerback
2017-09-17Oops. Missed a file.Kenneth R Westerback
Create global 'log_procname' and set it to '<ifname>' or '<ifname> [priv]' as appropriate for the process doing the setting. Use it as the prefix in all log_*() output. Makes tracking messages for an interface or a process much easier.
2017-09-17Create global 'log_procname' and set it to '<ifname>' orKenneth R Westerback
'<ifname> [priv]' as appropriate for the process doing the setting. Use it as the prefix in all log_*() output. Makes tracking messages for an interface or a process much easier.
2017-09-15Use a poll() loop when trying read the default route fromKenneth R Westerback
a routing socket. Fixes at least one cause of resolv.conf confusion and possibly hanging/looping dhclient if the RTM_GET gets lost. Fingered by phessler@ when doing many suspend/resumes while switching between wifi and wired interfaces. Testing & ok phessler@
2017-09-15Move/add log_procinit() and setproctitle() calls so they reliably workKenneth R Westerback
both early and after forking. Makes fatal[x]() messages more informative by always including the relevant interface name. And "[proc]" in privileged process messages. Simplify some logic by avoiding error message construction that is no longer required.
2017-09-14clarify what inet6 autoconf does, mention and link to slaacd(8)Sebastian Benoit
ok/feedback sthen@ jmc@
2017-09-14clarify that slaacd is a client; Xr to rtadvd. feedback/ok benno jmcStuart Henderson
2017-09-14Strive to rationalize fatal[x]() usage andKenneth R Westerback
verbiage.