Age | Commit message (Collapse) | Author |
|
used rather than deducing them. Use priv_add_route() to add
the 127.0.0.1 address when adding an address.
|
|
to be used.
|
|
passing the correct destination for the default route, '0.0.0.0', rather
than the new lease address.
Populating egress group works this time.
Problem found the hard way by Chris Smith.
|
|
broke populating the egress group.
|
|
since the former relies on the latter and the latter breaks 'egress'
group populating.
|
|
routes option (121).
ok sthen@
|
|
function that will be reused for future work.
ok claudio@
|
|
the first expected RTM_NEWADDR arrives, which signals that a lease
has been bound to the interface. Ignore RTM_NEWADDR and RTM_DELADDR
messages until the flag has been set.
Makes it more likely that the last dhclient started will be the
last dhclient standing. Fixes the problem reported by David Higgs,
where restarting an install in a vm consistantly caused the new
dhclient to be the one that dies.
|
|
pointless ones, make multiline comments readable, nuke '...' in
favour of '.', etc.
|
|
client->offered_leases into TAILQs.
|
|
strptime() rather than handrolling parsing. Change date format
in leases to same as dhcpd, fixing 'u' vs 'w' error made in
initial strftime() introduction.
|
|
|
|
relevant entries from the arp cache, don't bother asking for/processing
arp entries in the route dumps. Thus allowing use of NET_RT_FLAGS
with RTF_GATEWAY and AF_INET, to ask for only the routes dhclient
wants to expunge rather than all routes in existance.
Greatly shrinks and simplifies the code. No intentional functional
change. Tested by sthen@.
|
|
to be there! Instead, always record the client-identifier used to obtain
the lease. Ignore recorded leases that have a different client-identifier
than the one currently in force. If a client-identifier is not specified
in the dhclient.conf file, construct one from the network type and
MAC, like most other clients out there do these days.
Thus, if one plugs in a different USB network adapter, renewing the
previous lease (which upsets servers due to the MAC being different)
is skipped and DISCOVER is attempted at once.
Issue noted and fix tested by tedu@.
|
|
the messages into dynamically allocated memory rather than a char
array on the stack. Revealed by armish bus error when installing
latest snap.
ok deraadt@
|
|
state_panic() instead of state_init().
state_init() immediately issues a new DISCOVER message and neither
checks dhclient.leases.IF nor daemonizes.
state_panic() looks for a lease in dhclient.leases.IF, and if none
are available, waits for 'retry' seconds before retarting the
DISCOVER process. Most importantly it calls go_daemon() to take the
process into the background, giving back the command prompt.
Reported by otto@ and deraadt@. ok deraadt@.
|
|
the link comes back we will start from scratch with DISCOVER. Stops
pointless attempts to issue packets over a disconnected interface.
Noticed by deraadt@
|
|
IMGS_CLEANUP/imsg_cleanup/cleanup to IMSG_HUP/imsg_hup/sendhup to
more accurately reflect intent of causing the privileged process
to initiate restart.
There should now be one and only one message logged at termination
or restart, logged by the process initiating the termination or
restart.
As part of fixing this, remove duplicate cleanup attempts and exit
after sending IMSG_HUP. These make logged messages more consistant and
fix issues with incorrect cleanups.
More prodding from deraadt@
|
|
1) If the pipe to the priv process is closed while waiting for
something to happen in the non-priv dispatch() loop, assume the
priv process issued an error message and exit without additional
verbiage.
2) Ditto if the pipe to the priv process is closed when the flush
of IMSG_CLEANUP is attempted.
3) No need to report when SIOCDIFADDR fails because the address is
already gone.
Start to ensure the priv process always issues a useful message
before exiting by noting when it restarts due to the LLADDR having
changed.
Prodded by deraadt@ to clean this up.
|
|
error message to show problematic table id and use clearer
verbiage suggested by sthen@.
Should fix (another!) problem reported by Andreas Bartelt, who
noted that lease renewals did not work in a non-default routing
domain.
ok sthen@
|
|
|
|
ok beck@
|
|
zeroed, rather than some other variable that may be the same type.
|
|
correct field.
|
|
|
|
result of its LLADDR changing! Check said address and if it differs
from what we think it is, simulate a SIGHUP to restart, getting the
new address and a new lease for it.
Spotted by, fix tested by, and ok beck@
|
|
attempts to send DISCOVER or REQUEST packets. Some DHCP servers might
NAK the DISCOVER, or other nefarious packets arrive, between attempts
and overwrite the packet being sent. Create and use another buffer
for packets being sent.
Problem encountered by fgsch@, who noticed that once the DISCOVER was
NAK'ed our dhclient sent a bunch of NAK's back to the server. Like it
thought they were DISCOVER messages.
ok beck@
|
|
SIGTERM is used to make processes go away during system shutdown and
NFS filesystems may be still be in use when it is received. So removing
routes to the NFS servers is a bad thing.
Problem discovered and fix tested by landry@.
|
|
an option list if it contains duplicate option names. Just ignore
the duplicates.
|
|
bind_lease().
|
|
so it is easy to see which interface generated it.
|
|
should be written. Bad cut 'n paste.
|
|
ok krw@
|
|
ok krw@
|
|
same variable to determine if cumulative lengths of strings to be
put in buffer are > 0. Otherwise we always think here is something
to put in buffer.
Reported by florian@ and his friend llvm.
|
|
message. Handle an empty resolv.conf.tail without exiting. Don't
leak an fd if fstat() on resolv.conf.tail fails. Make fstat()
failure on successfully opened resolv.conf.tail a fatal error.
From Tim van der Molen. Thanks!
|
|
of the process binding the lease. Re-check the default route whenever
a routing message arrives that might mean the default route has
changed, and write out resolv.conf if appropriate.
Reduces the chances that the name servers in resolv.conf are
unreachable.
Problem most eloquently explained, and solution suggested by beck@.
|
|
lease and reuse as required whenever resolv.conf is written. Use
write_file() rather than a custom message/functions to write out
resolv.conf.
|
|
touch resolv.conf" behaviour.
|
|
application during subsequent resolv.conf building.
|
|
|
|
|
|
the most recent offer and effective leases will be written. Intended
to allow access to dhcp option information that was formerly
passed to dhclient-script.
|
|
configured. Only exempt default routes labelled as being the
property of another dhclient.
|
|
causing a problem, it was accessing uninitialized pointers.
|
|
|
|
and log messages.
|
|
a pending address addition.
Should fix "routehandler: interface address added" messages and
premature exiting of dhclient seen by henniing@ amoung others.
|
|
process to ask that a file be written by the privileged process.
Not yet used.
|
|
discards bad options. THEN check to see if any required options are
missing and reject both OFFER and ACK packets that lack required
options. Since it is the latter's lease we actual bind.
Move required option check into packet_to_lease() instead of
duplicating it.
|