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@
|
|
an error occurs.
ok krw@
|
|
which involved doing a write_option_db() call at a different point in
bind_lease().
However one of the parameters was in a variable that was also used for
iterating a TAILQ so this did not have the intended contents (it was
always NULL at the end of TAILQ_FOREACH*, resulting in a null deref
when dhclient -L is used).
Fix by using a new temporary variable. ok krw@
|
|
gateway is not reachable via the IP address/netmask provided by the
lease. Allows OpenBSD to work as well as iOS in certain
weird/misconfigured/overly clever hotspots.
A generalization of the handling of the /32 addresses handed out by
Goggle Cloud, suggested by claudio@
Error in initial diff pointed out by henning@.
Feedback from job@, mpi@, kn@.
Tweaks & ok claudio@
|
|
get_recorded_lease() returning NULL.
Should fix segmentation fault reported by Klemens Nanni on bugs@.
|
|
always report a link status of UNKNOWN.
Do not use recorded leases to configure such interfaces. In such
cases only use the address in the recorded lease to ask for a
new lease.
Avoids debilitating /etc/resolv.conf changes by unplugged higher
priority interfaces given to the tender mercies of dhclient after a
working interface has already set /etc/resolv.conf correctly.
Reported for cdce(4) by guenther@ at p2k18.
|
|
lease and exit.
Man page tweaks from jmc@.
Request, tests & ok tb@. ok millert@ on previous
version.
|
|
default route and thus 'owns' resolv.conf. So check if resolv.conf
should be (re)written after all IPv4 RTM_NEWADDR or RTM_DELADDR
messages.
|
|
obeying RFC 2131 will never echo the identifier in OFFER/ACK packets.
Servers obeying RFC 6842 will always echo the identifier. Confused
servers may or may not do the echoing.
This permits more reliable association of recorded leases with the MAC
address in use at the time the lease was obtained.
Requested by & ok tb@
|
|
'prepend', 'default' and 'supersede' directives with respect to
'ignore'.
Document 'filename', 'fixed-address', 'next-server' and 'server-name'
directives.
|
|
file before going daemon.
Alleviates a race scripts (e.g. the installer in autoinstall mode) can
encounter under the reasonable assumption that all related information
is available when dhclient(8) returns control to the script as a
result of going daemon.
Pointed out by rpe@.
|
|
ok krw@
|
|
array. Just point at the provided optarg like '-l' does. Also,
no need to initialize a static pointer to NULL.
|
|
ignored.
|
|
alongside 'request'.
|
|
NULL, on failure.
Eliminates possible "option = ;' lines in lease files.
|
|
with log_debug() so -v unleashes all debug output without having to
compile a custom dhclient.
|
|
Spotted by Pontus Lundkvis. Thanks!
|
|
the interface's address and thus the cached configuration data becomes
invalid and must be discarded.
Issue found & fix tested by Christer Solskogen. Thanks!
|
|
name does not cause the lease to be rejected. It just causes the
containing option or field to be ignored.
|
|
Mkae 'ignore', 'request' and 'require' cumulative so all
options don't have to be jammed into one line.
|
|
to go_daemon() while waiting for the RTM_IFINFO message.
Problem spotted by Holger Mikolon.
|
|
fix the accounting for the interval since we started the
process of getting a lease.
Fixes the 'no lease ... got lease' messaging at a minimum.
|
|
compare that to the offered proposal to determine if there are any
changes to configure. Simpler, and fixes issue where using a recorded
lease meant the interface was continually being configured with the
same information.
|
|
into a function tick_msg(). Now both work the same way,
dot dot dotting as time passes until they 'sleep'.
Tested by tb@ as part of a larger diff.
|
|
to decide between unicast and broadcast for REQUEST.
|
|
the renewal time is in the past wait retry_interval before
trying to renew the lease.
|
|
messages with interface name.
Spotted by & ok tb@
|
|
behaviour.
Always go daemon after link_timeout seconds and complete lease
negotiations in the background if necessary. No hanging around in the
foreground for the full 64 seconds waiting for a server to appear.
Log a more relevant message when a default route can't be obtained via
RTM_GET. i.e. "no default route" rather than "No such process".
-q -> -v ok mpi@
|
|
dhclient was started with '-d'. Move the "yielding responsibility"
message to log_debug(). Stop logging duplicate "bound to ..."
messages now that one is guaranteed to be present when the address is
first bound. Thins out logs. Especially if you run with '-q'.
|
|
link status changes. Simplifies some logic.
|
|
|
|
either the server IP/MAC or the name of the leases file.
Prompted by phessler@ and landry@ feedback to another diff.
ok phessler@
|
|
messages at startup. Reproducible situation found on
vnet(4) and fix tested by jca@.
|
|
instead of #if DEBUG.
|
|
appropriately. Fixes '-q' logging oddities.
Prompted by phessler@ plea for '-v'-like behaviour rather
than putting everything under DPRINTF()'s.
|
|
appropriate function to process a packet.
|
|
relevant.
|
|
#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@
|
|
function names and function code into sync.
|
|
|
|
in the names of the respective parsing functions.
|
|
parse_number('L') since it is parsing unsigned 32bit integers.
|
|
match grammar comments and improve euphony.
|
|
|
|
|