Age | Commit message (Collapse) | Author |
|
the way the man page says.
ok tb@
|
|
reality.
|
|
next option. Don't rely on truncated NULs being ignored because
NUL == DHO_PAD.
ok tb@
|
|
extra byte is always there. Even if the byte contains
innocuous data that isn't used. Eeven if a particular
level of optimization of a particular compiler avoids
it by processing things backwards. Bad.
So simplify and correct logic. Perhaps even proof the
code against future generations of clever compilers.
Pointed out by Brandon Falk. Thanks!
ok millert@ tb@
|
|
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!
|
|
|
|
'<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.
|
|
verbiage.
|
|
and accept NULL pointers for unwanted components of
the route.
|
|
a stray "if (char)" -> "if (char != '\0').
|
|
use it to simplify logic at both places that process
RFC 3442 data.
|
|
an internal 8K static buffer whose contents
are simply copied into another 8K buffer in
the caller.
Just pass a pointer to and length of the
outer buffer.
|
|
"<var> == 0", "!(<var> & FLAG)" with
"(<var> & FLAG) == 0", "!<func()>"
with "<func()> == 0" and "!<define>" with
"<define> == 0". And the positive cases
as well.
A few stray == NULL and != NULL as well.
|
|
"<pointer> == NULL". And of course "<pointer>"
expressions with "<pointer> != NULL".
|
|
declarations.
|
|
|
|
table (dhcp_options) involved. Provide functions
code_to_name(), name_to_code(), code_to_format() and
replace direct access to dhcp_options with them. Eliminate
unneeded 'struct option'.
Unhook tables.c from Makefile.
|
|
and sometimes uintNN_t.
|
|
DHO_COUNT.
|
|
unpack_options(). Store the unpacked options in a static
variable. Move remaining raw packet processing from unpack_options()
to packethandler().
No more struct interface_info knowledge in options.c
|
|
pack options into. Not all the gory details of interface_info.
Move some of the raw packet processing out of options.c's
do_packet() and into the more obvious dispatch.c's
packethandler().
Mention that RFC791 is why we use 576-byte UDP packets.
|
|
dhcpoffer(), dhcpack(), dhcpnak().
|
|
client_state to interface_info.
No intentional functional change.
|
|
fields to move: recv_packet, sent_packet and sent_packet_length.
No intentional functional change.
|
|
field to 'sent_packet'. Also 'bootrequest_packet_length' to
'sent_packet_length'.
Adopt consistent idiom of a local variable 'packet' to point at
packet being manipulated.
No intentional functional change.
|
|
win.
No intentional functional change.
|
|
'int' -> 'unsigned int' (and visa versa) where obvious.
Steal a couple of 'unsigned' -> u_int32_t from reyk@'s dhcrelay
tweaks.
No intentional functional change.
|
|
strlcat(). Shorter, clearer, fewer signed vs unsigned questions.
Use an 8K static buffer for pretty_print_classless() and use it
rather scribbling intermediate values into the final destination.
No intentional functional change.
|
|
strlcat(). Shorter, clearer, fewer signed vs unsigned questions.
Shrink static buffer for the string version of an option value from
32K to 8K. Since the string version of the entire lease is constructed
in a 8K buffer, bigger option values are pointless.
Use 8K of the saved space for a static buffer for pretty_print_string()
and use it rather scribbling intermediate values into the final
destination.
No intentional functional change.
|
|
change.
|
|
Replaces incorrect manual emulation of vis() for single, double and
back quotes, dollar signs and back slashes. Just use vis() with
VIS_ALL for these characters.
Should fix problem reported by robert@ with ssid's containing back
slash.
|
|
incoming #ifdef's.
|
|
|
|
No objections heard. Feedback from millert@ guenther@
|
|
the server provides a client-identifier value and it doesn't match
the value the client sent.
So stop suppressing client-identifer info in the leases file and when
reading the leases file stop discarding leases that don't have current
client-identifier info. Don't use them, but keep them around in case
the client-identifier info changes back next time.
Also construct the default client-identifier (if needed) before reading
the leases file.
|
|
ok henning@, krw@
|
|
ok krw@
|
|
functions needing it.
This is the first step to support multiple interfaces in one dhclient(8)
instance.
ok krw@
|
|
each *.c file.
Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.
|
|
Search" if supplied by the server.
Requested by a few. Original diff from Ray Lai via tech@.
Tested & ok claudio@
|
|
ntoh[ls]()) obscure rather than simplify things. Especially when
they are used only once. Just use the expansion.
|
|
an IPv4 address. Just memcpy() it.
|
|
|
|
halex@ and krw@ pointed out that a NULL check before free can go, too.
ok deraadt@, halex@, krw@
|
|
DHO_CLASSLESS_MS_STATIC_ROUTES. Remove 'C' (CIDR) pretty printing
outside of those special cases. Add a bunch of paranoia to protect
against confused/malicious dhcp servers.
Since 'C' is a variable size element it can't be handled by the
existing code, which is designed for fixed size elements.
Issue found by Someya Yuuichi, reported by yasuoka@ who also provided
the first diff.
ok yasuoka@
|
|
|
|
(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!
|
|
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.
|
|
time.
|
|
time.
|