Age | Commit message (Collapse) | Author |
|
for a couple of years, backed by dhcpleased(8), which provides much better
dns handling. The next step is to make the dhclient simply execve
ifconfig in that way, and provide syslog warnings about deprecated options
along the way. This way, we can find the last few dhclient users, and what
they are missing.
ok florian krw
|
|
dhclient.
OK tb, kettenis
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
macro-build a replacement for sccsid, and was done without any concern
for namespace damage. Unfortunately this practice started infecting
other code as others were unaware they didn't need the file.
ok millert guenther
|
|
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef.
ok millert
|
|
set_iff_up() is called from initialize_interface() and was using
log_procname instead of ifi->name in its fatal()'s.
Diagnosed by tb@ from a recent reddit post by zielonykid1234.
|
|
to Xr;
|
|
dhclient instances for the interface, check if the IPv4
AUTOCONF flag is set. If it is, go quietly into that good
night and let dhcpleased do its thing, comforted by the fact
that dhcpleased knows that a new lease has been requested.
requested, tested & ok florian@
|
|
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.
Work done and verified by Ashton Fagg <ashton@fagg.id.au>
ok deraadt@ semarie@ claudio@
|
|
initialize_interface() logic into closer alignment, and try harder to
initialize link_state at start up.
|
|
|
|
(ACK/NAK), add details (DISCOVER/REQUEST) and provide
before/after info for SSID/LLADDR/MTU changes.
|
|
rather than waiting for select_timeout to expire before accepting the same
OFFER.
|
|
requested in the DISCOVER.
i.e. immediately accept the OFFER rather than waiting for select_timeout to
expire before accepting the same OFFER.
A corner case since select-timeout is 0 by default.
|
|
|
|
Call tick_msg() at startup so it knows if the link
is up. Don't emit 'link timeout expired' messages
after the link has been up.
|
|
cross flip CLOCK_REALTIME to CLOCK_MONOTONIC.
Suggested by cheloha@, millert@, otto@ at various
stages in the time_t -> timespec conversion.
|
|
timespec values. Translate from the epoch values in leases
to timespec values in one place.
Final step to allow CLOCK_REALTIME -> CLOCK_MONOTONIC time
accounting for the active lease.
|
|
|
|
|
|
are exceeded.
Feedback from otto@, cheloha@
|
|
Feedback from otto@
|
|
net/route.h pulls this is as a side-effect.
OK krw@
|
|
already gone daemon. Sometimes it's just that 2>/dev/null or something has
been done.
Should fix problem with sysupgrade when an interface (e.g. a wired interface that
has no cable plugged in) never comes up.
Problem reported and debug info from kettenis@, Jean-Philippe Luigi, Thomas L. and
Markus Lude. Thanks!
|
|
all the other struct timespec variables holding the current time.
|
|
toss expired leases when writing the list to disk. And write the list
to disk before using a lease from it. Just make sure ifi->active
isn't tossed.
|
|
calls to avoid losing those debug messages if
tick_msg() notices link-timeout has expired and daemonizes
dhclient.
|
|
grace period of silence before emitting "<if>: no lease...", even if
the link has taken a few secocnds to come up. 'link-timoeut' remains
the hard deadline for going daemon.
|
|
required in read_lease_db(). It's already set in packet_to_lease() and
thus both paths to TAILQ_INSERT(lease_db) ensure there is a non-zero
epoch in all lease_db entries.
|
|
Simplifies -v output, and reduces non-'-v' output.
Reduce non-'-v' output further by only displaying the first 'link up'
event.
Restore behaviour specified in dhclient.conf(5) of going daemon after
link-timeout seconds, rather than waiting another link-timeout seconds
for a lease to be accepted.
Lease verbiage problem reported, and fix tested by Mihai Popescu. Thanks!
Link verbiage problems reported, fix tested & ok tb@.
|
|
No functional change but a bit more obvious and shrinks upcoming diff.
|
|
obtained cur_time to initialize a missing lease->epoch.
|
|
leases. It can't be NULL, and is unconditionally dereferenced a few lines
later anyway.
|
|
|
|
for future attempts at making it more IPv6-like.
ok florian@
|
|
ok krw@
|
|
default reboot interval of 1 sec. Gives the DHCP server a
fairer shot at replying before the timeout expires.
ok millert@
|
|
'reboot_timeout' to 'offer_interval', 'link_interval' and
'reboot_interval' to be consistant with other '_interval' fields that
specify a number of seconds to wait.
|
|
tracked in tick_msg() and explicitly calling tick_msg(TICK_SLEEP).
One fewer use of each of time(), ifi->startup_time and
config->link_timeout. Makes code easier to follow.
No intentional functional change.
|
|
invoked when log_getverbose() returns 0.
|
|
into new set_interval()/set_secs() functions. send_request() and
send_discover() become much easier to understand.
No intentional functional change.
|
|
|
|
|
|
reliable and consistant.
Eliminate unused time_t parameter since we only tick during the first
link_timeout seconds. Replace it with 'action' parameter to clearly
indicated what tick_msg() is supposed to do.
Fix issuance of '\n' before log_debug() messages. Properly
reinitialize static variables.
Use more precise 'timespec' timers, hewing to idiom suggested by
cheloha@.
|
|
Switch from poll(2) to ppoll(2) in a few more functions.
Because we're working with ppoll(2) and clock_gettime(2) it is easier
to encode the various timeouts as static const timespecs instead of
preprocessor macros. This way we aren't packing timespecs in the
middle of the code, which distracts from the (more important) logic of
what the code is doing.
Part of a larger campaign improve "time stuff" in dhclient(8).
Prompted by and discussed with krw@. Based on a diff by krw@.
ok krw@
|
|
Use ppoll(2) instead of poll(2) in default_route_index(). Using
ppoll(2) here forces us to use clock_gettime(2) to measure the
timeout, which is less error-prone than using time(3).
Part of a larger campaign in dhclient(8) to make "time stuff" more
accurate and robust.
Prompted by krw@. Based on a diff from krw@.
ok krw@
|
|
Reduces spurious packet transmissions in situations with short timings.
Suggestions millert@, further suggestions & ok cheloha@
|
|
when an invalid option name is encountered.
|
|
fatal() immediately whem parsing command line option '-c' reveals a non-existant
file.
Original diff, tweaks & ok kn@
|
|
file.
Original diff, tweaks & ok kn@
|