Age | Commit message (Collapse) | Author |
|
in struct client_config.
|
|
time, renewal time, rebinding time. Use the ACTION_DEFAULT mechanism
to set the default expiry time for any lease so gauche as to not
provide one. Use the DHCP default lease times for BOOTP leases instead
of, bizarrely, shorter times.
|
|
specified in dhclient.conf;
ok krw
|
|
|
|
|
|
lease handling. Simplifies code and makes it easier to
consider excising this 'feature'.
|
|
SSID against ifi->ssid, not the SSID of the new lease. They
should be the same, but this makes the intent clearer and removes
an assumption about the contents of ifi->active.
|
|
pointed out by krw
|
|
by aja and others.
ok krw
|
|
and into struct interface_info. Nuke set_lease_times().
|
|
for a custom res_hnok(), so just use the libc version of res_hnok().
Requested by deraadt@
|
|
and lease_[expiry|rebind|renewal]() functions.
|
|
renewal value.
|
|
lease_expiry() and lease_renewal(). Simplifies logic and upcoming
changes.
|
|
calculate the value when required for a particular lease.
|
|
wall clock time, not length of lease time.
|
|
use, always recalculate offer expiry time based on the information in
the original offer.
|
|
dhclient.leases and the 'offered' lease generated by -L. i.e. the
times contained in the actual offer, and not the 'effective' times
that reflect changes imposed by dhclient.conf or -i.
|
|
by such misconfigured DHCP servers.
Original diff from and ok krw@, ok sthen@
|
|
|
|
|
|
renew/rebind/expiry. Treat renew/rebind/expiry statements in leases as
comments for human consumption.
|
|
received. Set it in packet_to_lease() and preserve it in
apply_defaults(). Otherwise not used, documented or printed in lease
database yet.
|
|
integers.
|
|
duplicate offers for other addresses, so that the fastest
responding and presumably 'closest' DHCP server is used.
|
|
fopen()'ing the the file with a mode of "a" (so watchers don't detect
changes until the file is re-written as part of interface
configuration) but using rewind() to start writing from the beginning
of the file.
Use ftruncate() and overwrite the date as intended, rather than
appending new data.
Problem reported and diffs tested by Mike via tech@. Thanks!
|
|
|
|
ok jmc@ tb@
|
|
"do {} while (1)".
|
|
emitted when other unsigned 32-bit values are parsed. i.e.
"expecting integer between 0 and 4294967295". No need to
make people google what "unsigned 32-bit decimal value" means.
|
|
declarations and placing 'lease' declarations inside
'interface' declarations.
Document and enforce requirement that all 'lease'
declarations must specify the interface to which they
apply.
Ignore static leases that apply to other interfaces rather
than complaining the interface name is wrong and using the
lease anyway.
|
|
into the 0/1 for success world.
|
|
|
|
return 0/1 for success.
|
|
|
|
terminated by a '\n' can generate error messages pointing
at the offending token, rather than pointing at a blank
line.
|
|
description of "lease {}" format to dhlcient.leases.5.
Neither implement standards so coalesce STANDARDS sections
into dhclient.8. AUTHOR and HISTORY sections not normally
used for .conf man pages so drop them. Many tweaks.
Language/formatting suggestions, stamp of approved by jmc@.
|
|
associated weird comment about parsing resolv.conf.
dhclient.conf and dhclient.leases.<if> are semi-colon
oriented and not line oriented. '\n' is never returned
by get_token().
|
|
TOK_* case:'s alphabetically to make it easier to
find things.
|
|
returning 0/1 for success, etc. Simplify it
by only supporting a single ip address per
statement, as dhclient.conf(5) states. Don't
add duplicate addresses to the reject list.
|
|
|
|
to parse_hex_octets() and have it return 0/1 to indicate success,
to not touch existing data on error paths, to handle ';'
better, emit single error message ("expecting colon
delimited list of hex octets."). Fold parse_hex() into
parse_hex_octets().
Simplify logic in parse_option_decl() to eliminate duplicate
overflow error checking and error messages as a result.
|
|
to not touch existing data on error paths, to handle ';'
better, emit single error message ("expecting comma
delimited list of option names.").
|
|
to not touch existing data on error paths, to handle ';'
better.
|
|
|
|
|
|
0 for failure, 1 for success, emitting a
single error message ("expecting string.") and
handling ';' better.
Don't leak memory when encountering pathological
config or lease files containing repeated instances
of an option or command with string data.
|
|
committed.
|
|
some 'return;'s that should be 'break;'s.
|
|
code in the same way as the other parse_*()
functions. Whitespace fix in comment while
passing. Also conform to idiom that original
data is not changed in the error path.
|