Age | Commit message (Collapse) | Author |
|
parse_number('L') since it is parsing unsigned 32bit integers.
|
|
match grammar comments and improve euphony.
|
|
inside 'lease {}' declarations. We don't keep leases from
multiple interfaces in dhclient.leases.<if> files.
One less thing to parse and keep in memory. More rope for
those wanting to do unspeakable things with their lease files.
|
|
functions and fields to more obvious names reflecting this
separation.
|
|
in struct client_config.
|
|
|
|
lease handling. Simplifies code and makes it easier to
consider excising this 'feature'.
|
|
and into struct interface_info. Nuke set_lease_times().
|
|
calculate the value when required for a particular lease.
|
|
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.
|
|
ok jmc@ tb@
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
failure ("expecting unsigned 32-bit decimal value") and to
properly handle the terminating ';' in error situations.
Make parse_lease_time() return an int to indicate success
or failure as its friends do. Also avoid swapping endianess
twice.
Use == 1 vs != 0 when checking parse_ip_addr() return
value.
|
|
providing the name of the packet type that causes
an error.
|
|
'<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.
|
|
and accept NULL pointers for unwanted components of
the route.
|
|
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.
|
|
SIG_ATOMIC_MAX for INTERNALSIG instead of
INT_MAX.
|
|
in the priv process, so that they do not have to be
continually retransmitted. IMSG_WRITE_RESOLV_CONF
now just triggers a write of the cached info.
Simplifies a bunch of logic.
|
|
flush any queued messages on getting a POLLOUT.
|
|
|
|
should have the same add_route() logic applied to them as
the one supplied via DHO_ROUTERS. i.e. add the /32 route
if needed, create direct route if gateway address is the
same as interface address.
Simplify logic by using the canonical rtstatic[] version
of static routes created by lease_as_proposal().
|
|
they don't appear in effective leases at all.
|
|
files they are used in. Tweak a bunch of whitespace.
|
|
bind_lease() into set_routes() and set_address() respectively.
|
|
into it. Swap parameter order in add_default_route() to
be consistant with other add_*_route() functions.
|
|
lease address replaces all current addresses. Shuffle some
code from bind_lease() into set_mtu()/set_address() to
shrink bind_lease().
|
|
|
|
dhclient taking control of the interface.
In particular do not exit when addresses are manually added to or
deleted from the interface dhclient(8) is concerned about. Note that
such changes will still be removed whenever dhclient(8) is re-started
or gets a different lease during renewal.
|
|
renaming "if_register_bpf()" to "get_bpf_sock()",
"if_register_send()" to "get_udp_sock()" and
"if_register_receive()" to "configure_bpf_sock()".
Pull back interface_info knowledge and just pass
the interface name, rdomain and bpf socket fd as
required.
|
|
chars to parse_decimal() instead of less obvious *fmt; refactor
to eliminate need for the 'alloc:' and 'bad_flag:' labels and the
invidious backwards goto's to them.
|
|
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.
|
|
No more struct interface_info knowledge in packet.c
|
|
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.
|
|
pass the interface name and the TAILQ to put static leases into.
Add a TAILQ for static leases to struct client_config to hold the
static leases until it's time to add them to ifi.
Add add_lease() to add leases to a TAILQ while checking for
leases that are superseded by the new lease.
|
|
correct place and passing the invocation the correct parameters.
Noticed by & initial diff from matthieu@
|
|
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.
|
|
fields 'hardware', 'alias', 'media', 'medium', 'ethernet'.
Also remove now-unused parse_ethernet().
Making these parsing failures will smoke out anybody with
leases or conf files from the last century.
|
|
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.
|
|
need to expose its definition in dhcpd.h. While here change
the parameter from struct interface_info to int and just pass
the only field used (rdomain).
|
|
whenever dhclient dies. Eliminates differences in handling
and thus need to intercept signals INT, TERM, USR1,
USR2. Eliminates need for 'zapzombies' field and thus
entire struct imsg_flushroutes. Eliminates need for 'imsg'
parameter to and associated logic in priv_flush_routes().
Address, routes and '-L' file are still cleaned out when
binding a lease.
|
|
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.
|