Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-01-25 | Correct parsing of dhclient.conf statements 'fixed-address' and | Kenneth R Westerback | |
'next-server'. Modify new lease being cloned with their values rather than overwriting original lease being cloned. | |||
2014-01-21 | Allow dhclient.conf to specify 'fixed-address', 'next-server', | Kenneth R Westerback | |
'filename' and 'server-name'. dhclient.conf can now override anything in an offer or saved lease when creating the effective lease. | |||
2014-01-21 | Add parsing for options 121 (classless-static-routes) and 249 | Kenneth R Westerback | |
(classless-ms-static-routes). dhcpd can now specify and serve these options and dhclient can recognize and use supersede, etc. statements on them. Based on a diff from Stefan Rinke. Thanks! | |||
2014-01-20 | Preserve tabs when constructing the "^" line in parse_warn(). Now | Kenneth R Westerback | |
error messages line up the "^" correctly even when tabs are present. | |||
2014-01-20 | more %d type correctness; ok krw | Theo de Raadt | |
2014-01-20 | %d cleanups, to other formats; ok krw | Theo de Raadt | |
2014-01-20 | Don't silently skip the next statement when encountering an | Kenneth R Westerback | |
invalid IP in a reject statement. | |||
2014-01-20 | Cast pointer to (u_int8_t *) when assigning it to a u_int8_t * | Kenneth R Westerback | |
variable. | |||
2014-01-19 | We don't have any (and I can't find elsewhere) signed 16 bit or | Kenneth R Westerback | |
signed 8 bit dhcp option types. So nuke getShort() and all 's' and 'b' format support. While here use '%u'/'%lu' and not '%d'/'%ld' to snprintf() unsigned values. | |||
2014-01-19 | Nuke unused functions putLong(), putUShort(), putShort(). | Kenneth R Westerback | |
2014-01-19 | Redo the parsing of numbers to improve the error messages and | Kenneth R Westerback | |
make the code more readable. And prepare for some new things that will need to be parsed. ok dlg@ | |||
2014-01-19 | Rename parse_hardware_param() to parse_ethernet() to reflect what | Kenneth R Westerback | |
it actually does. | |||
2014-01-19 | Adjust lexchar position by ugflag once only. | Kenneth R Westerback | |
2014-01-18 | If ugflag (indicating a character from the file being parsed has been | Kenneth R Westerback | |
unget()'ed) is set, then properly set the lexchar position back one in get_token() so more error messages put the '^' in the proper spot. | |||
2014-01-18 | Remove superfluous assignment to local variable 'val' just before | Kenneth R Westerback | |
exiting. | |||
2014-01-18 | Make parse_warn() messages consistantly use 'expecting' rather | Kenneth R Westerback | |
than occasionally 'expected'. End all with a '.'. | |||
2014-01-18 | Never silently consume the following statement when unexpectedly | Kenneth R Westerback | |
encountering a ';'. I.e. when checking the token type, 'skip_to_semi()' after 'parse_warn()' only when the parsed token wasn't a ';'. | |||
2014-01-17 | Do not follow symlinks for -l and -L arguments. | Tobias Stoeckmann | |
ok krw@ | |||
2014-01-17 | Make parse_X return -1 when it encounters a parsing error. Enables | Kenneth R Westerback | |
recognition of zero length value vs parsing error. This lets us avoid the erroneous consumption of the semicolon ending the 'X' value, and the resulting accidental consumption of the following line in the file being parsed. | |||
2014-01-16 | Avoid size_t overflow while reading /etc/resolv.conf.tail. | Tobias Stoeckmann | |
ok krw | |||
2014-01-13 | peek_token() a bit more to replace a bunch of manual checks with | Kenneth R Westerback | |
the perfectly adequate parse_semi(). And some blocks didn't even need to peek. | |||
2014-01-13 | Don't eat another token looking for a ';' after skip_to_semi() has | Kenneth R Westerback | |
been invoked. Fixes silent loss of the statement following a broken or inapplicable 'interface' declaration in a lease, or an unrecognized lease attribute. | |||
2014-01-13 | No need to 'clear the peek buffer' when closing a file. The next | Kenneth R Westerback | |
file opener will call new_parse() to initialize that amoung other things. Nuke extraneous blank line in passing. | |||
2014-01-13 | Don't eat two tokens when encountering a non-terminal '}'. Avoids | Kenneth R Westerback | |
possibly ignoring entire rest of dhclient.conf or dhclient.leases.if looking for a mistakenly consumed '}'. | |||
2014-01-13 | warning(), note(), debug(), parse_warn() always return 0, which no | Kenneth R Westerback | |
caller checks or saves. So just void them all. | |||
2014-01-12 | Since the return value of read_client_conf() is not checked, don't | Kenneth R Westerback | |
bother returning one. | |||
2014-01-10 | Yet another annoyingly long line. | Kenneth R Westerback | |
2014-01-10 | skip_to_semi() is gilding the lily when the next statement breaks out | Kenneth R Westerback | |
of the loop and closes the file being parsed. And the previous statement warns the user the leases file being parsed has been determined to be corrupt. Eliminate further gilding in the form of an 'else' after the same 'if' clause includes the 'break'. | |||
2014-01-10 | KNF (UNF?). Split annoying long line. | Kenneth R Westerback | |
2013-12-30 | Replace yet another hand-rolled list with a TAILQ. reject_list this | Kenneth R Westerback | |
time. | |||
2013-12-28 | Remove unused variable 'token'. Spotted by deraadt@ | Kenneth R Westerback | |
2013-12-22 | Setting format id to 't' when it's already 't' is a waste of | Kenneth R Westerback | |
time. | |||
2013-12-22 | No need to change format id 'X' (ascii or hex) to 'x' (hex) while | Kenneth R Westerback | |
pretty printing, when 'X' is not used in the next switch statement. Just keep 'X'. Makes the code a touch less mysterious. | |||
2013-12-22 | Don't look for two semi-colons when encountering an unrecognized | Kenneth R Westerback | |
statement in dhclient.conf. | |||
2013-12-21 | Introduce pretty_print_string() and use for printing both text | Kenneth R Westerback | |
valued options and previously snprintf()'d filename and servername lease attributes. Should fix "string constant too long" errors when reading back a lease with filename or servername attributes with escaped characters. Reported by Rivo Nurges. | |||
2013-12-18 | Code existed to print non-printable characters in strings written | Kenneth R Westerback | |
to the leases file. No code existed to correctly read back the strings so written. Redo both sides and use vis()/strnunvis() instead of handrolling more parsing. As a side-effect allow embedded NUL characters rather than skipping them. | |||
2013-12-15 | Update timestamps in 'effective' lease before printing out the | Kenneth R Westerback | |
lease. | |||
2013-12-14 | Start cleanup/fixup of pretty printing of option data. Use snprintf() | Kenneth R Westerback | |
exclusively and thus simplify error checking/overflow detection. Bail out when unknown format character found. Don't ignore last character if it's unprintable. Print embedded NULs rather than ignoring them. | |||
2013-12-14 | When cloning leases remember to clone address, next_server and | Kenneth R Westerback | |
resolv_conf fields. Makes 'effective' lease written by '-L' a bit more useful. | |||
2013-12-12 | Delete spurious blank line. | Kenneth R Westerback | |
2013-12-12 | Eliminate (most) double decrements of remaining space in the pretty | Kenneth R Westerback | |
print buffer. Use consistant idiom to increment pointer to data being consumed, instead of hiding some increments. | |||
2013-12-12 | Assemble outgoing packets using iovec to combine the (optional) | Kenneth R Westerback | |
ethernet header, the ip header, the udp header and the packet. Rather than manually concatenating the headers and then using iovec to bundle in the packet. Eliminates some memcpy()s and convoluted data copying. | |||
2013-12-11 | Stray memcpy() using src size. | Kenneth R Westerback | |
2013-12-10 | Oops. Missed file. | Kenneth R Westerback | |
Rework [priv_]write_file() and associated struct imsg_write_file to use imsg_composev() rather than allocating memory, copying data into it, and then passing it to imsg_compose() to copy data again into imsg buffer. ok pelikan@ | |||
2013-12-10 | Rework [priv_]write_file() and associated struct imsg_write_file | Kenneth R Westerback | |
to use imsg_composev() rather than allocating memory, copying data into it, and then passing it to imsg_compose() to copy data again into imsg buffer. ok pelikan@ | |||
2013-12-09 | Refactor processing of classless static routes option (121). Add | Kenneth R Westerback | |
more data validation, reduce magic number count, shorter parameter name, reduce mem*() usage, etc. | |||
2013-12-08 | Reduce in_addr memcpy() dances by simply using assignments where the source | Kenneth R Westerback | |
variable has been copied to [cm]alloc'ed memory and thus properly aligned. | |||
2013-12-06 | Having stopped pretending we handle anything but ethernet packets, | Kenneth R Westerback | |
replace the 'struct hardware' abstraction layer and use 'struct ether_addr' where hardware addresses are of interest. ok matthew@, confirmed by reyk@ not to impact DHCP-over-IPSec support. | |||
2013-12-05 | Stop pretending we still support FDDI or token ring hardware types. | Kenneth R Westerback | |
idea ok deraadt@ matthew@ | |||
2013-12-05 | Use destination size as size of memcpy(). Use <in_addr> rather than | Kenneth R Westerback | |
<in_addr>.s_addr to shorten code. ok deraadt@ matthew@ as part of larger diff |