Age | Commit message (Collapse) | Author |
|
with log_debug() so -v unleashes all debug output without having to
compile a custom dhclient.
|
|
appropriate function to process a packet.
|
|
#ifdef DEBUG/#endif blocks.
Suggestions on correct idiom (C99 vs gcc) from millert@
ok tom@
|
|
-- renewal in 300000 seconds" becomes simply "em0: bound to 1.2.3.4"
While here avoid setting timeouts before the current time.
ok florian@
|
|
use standard error messages for malloc errors.
|
|
name of the function that failed and the significant
parameters. Distinguish between poll() errors and
problematic revents values.
|
|
|
|
need to complicate things by passing it a string
identifying where it was called. Tweak log
verbiage.
|
|
'<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.
|
|
added back.
ok mpi@
|
|
checks are done on the imsg socket to detect
closure, etc.
Die immediately if the priv process notices
the interface name can't be turned into an
index.
|
|
SIG_ATOMIC_MAX for INTERNALSIG instead of
INT_MAX.
|
|
flush any queued messages on getting a POLLOUT.
|
|
for EAGAIN as that is not a possible poll() errno.
suggestions & ok guenther@
|
|
files they are used in. Tweak a bunch of whitespace.
|
|
"<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.
|
|
the bpf socket signals that it has data, call packethandler() in a
loop until no more bpf packets are available.
|
|
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.
|
|
fd'd from main loops as required. One socket to do
ioctl's per process (called ioctlfd) and one socket to
do route messages per socket (called routefd).
Clean up local variable declaration lists in passing.
|
|
lease_as_string() and rewrite_option_db() only use the
interface name, so supply just the name.
Tweak interface_link_forceup() to use the same param
name as other functions taking the interface name.
|
|
ifa we use to get the interface hw address. One less socket() and
ioctl()! MIssed cleanup from shift to just watching RTM_IFINFO
messages for rdomain switch.
|
|
function. Don't exit dispatch() loop on SIGHUP, wait for privileged
child to execvp() dhclient. Eliminate struct imsg_hup since its
contents were not being used except in priv_cleanup(). And
'active_addr' works just as well there.
Cleaner and eliminates some extraneous log entries.
|
|
var = time(NULL). Flip "struct interface *" to be the first
parameter in set_timeout(), as in other functions taking the
state info.
|
|
|
|
the rest of the dhcp state. One less struct (dhcp_timeout) to
worry about, one less field (ifi) to keep track of.
|
|
then remove set_timeout() and rename set_timeout_interval() to
set_timeout().
|
|
"struct interface_info *" and not a "void *".
No intentional functional change.
|
|
client_state to interface_info.
Nuke empty struct client_state.
No intentional functional change.
|
|
Less of unreliable ioctl(SIOCGIFMEDIA), more getifaddrs().
ok mpi@
|
|
|
|
Replaces forcing interface link state down and up to generate
RTM_IFINFO messages.
|
|
|
|
'; exiting' suffix used by old style logging.
Eliminate an extra log message before fatal()'ing out with a summary
message.
|
|
instead of log_warnx() and fatalx(). A few log_info() to log_warn()
for the same reason.
Suggested by millert@.
|
|
|
|
No objections heard. Feedback from millert@ guenther@
|
|
rather than opening a fresh socket on the fly.
ok krw
|
|
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@
|
|
i.e. == 0 and != 0 as appropriate. No intentional functional change.
Suggested by & ok tom@
|
|
each *.c file.
Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.
|
|
|
|
using the SIOCGIFRDOMAIN ioctl. If the rdomain is changed an
RTM_IFINFO message is generated on the old rdomain indicating the
interface is down. This will cause dhclient to exit, just like our
manual check did but even faster!
Should make pledging easier.
Behaviour confirmed by phessler@
|
|
present. The latest routing stack code can now handle these situations.
Much requested by beck@ and others. Detailed discussion at s2k15
identified required routing changes.
ok claudio@
|
|
ok krw@
|