Age | Commit message (Collapse) | Author |
|
in a lease.
dhclient.c r1.634 made every RTM_IFINFO restart the DHCP protocol
and obtain a new/renewed lease. If the lease contained
interface-mtu the interface MTU was set. An RTM_IFINFO is
generated every time an interface MTU is set.
So only set the interface MTU if it is different from the
existing MTU. Fix using %d to print an unsigned value in passing.
Noticed and fix inmproved & tested by Bj??rn Ketelaars while
usihg the wifi on Dutch Railways.
|
|
(again?): when adding the default route, set it with the interface
address of the interface we are configuring. This way its possible to
have two default routes (from two running dhclient processes) in the
routing table. Since wireless interfaces have a higher prio value,
when a physical interface is connected it will be prefered (for new
connections).
ok krw@ mumble yes mumble claudio@
|
|
|
|
when setting new address.
That change needs specific consideration rather than inadvertant
inclusion, especially after claiming no functional change was
being made.
Change and related problems noted and reversion tested by Kurt
Mosiejczuk.
|
|
DHCP knowledge and interface manipulation.
Unprivileged process now sends proposal derived from the accepted
lease to the privileged process rather than individual interface
manipulation requests.
The only intended functional change is that /etc/resolv.conf.tail is
not re-read each time a new proposal is implemented, rather than once
at dhclient startup.
|
|
|
|
POSIX APIs".
Also sprach guenther@. So switch PF_ROUTE to AF_ROUTE in socket() and
setsockopt() calls. Keep PF_ROUTE in sysctl(2) uses. adding a comment
for future visitors,
Also replace PF_UNSPEC with 0 in socketpair(), as socketpair(2) points
out this is the only sensible value.
Cluebat from and ok guenther@
|
|
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@
|
|
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@
|
|
"do {} while (1)".
|
|
|
|
name of the function that failed and the significant
parameters. Distinguish between poll() errors and
problematic revents values.
|
|
|
|
|
|
'<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.
|
|
a routing socket. Fixes at least one cause of resolv.conf
confusion and possibly hanging/looping dhclient if the
RTM_GET gets lost.
Fingered by phessler@ when doing many suspend/resumes
while switching between wifi and wired interfaces.
Testing & ok phessler@
|
|
verbiage.
|
|
and accept NULL pointers for unwanted components of
the route.
|
|
route if found. Cleans up some int vs unsigned int
confusion and makes the function more generally useful
for future changes.
|
|
added back.
ok mpi@
|
|
use it to simplify logic at both places that process
RFC 3442 data.
|
|
by dhclients, there is no need to retry adding a route
if the first attempt fails with EEXIST. And EUNREACHABLE
should be considered final since the address if any is
already configured.
Use log_getverbose() to allow logging of EEXIST errors.
|
|
get_rtaddrs() prototype.
|
|
the get_rtaddrs() everyone is using. Soon to be
used or deleted.
|
|
contents doesn't do what you think it does.
Restore "no dns servers, no search, means don't touch
resolv.conf" behaviour unintentionally changed at t2k17.
Noticed by ajacoutot@ during an upgrade using a
non-OpenBSD dhcpd server that only provides the
options it is asked for.
|
|
No intentional functional change.
|
|
by labelling dhclient routes. Just use
the route(8) logic when flushing routes.
ok benno@ claudio@
|
|
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.
|
|
reflect what it does.
|
|
|
|
which the current default route exits.
If the dhclient instance owns that interface it
owns resolv.conf and will overwrite it no matter
who created the default route.
Feedback & suggestions claudio@
|
|
needed to get a set of routes.
|
|
particular stop providing RFA_IFA, and instead supply the
relevant interface index in the RTM_ADD message.
Various code simplifications as a result.
|
|
added. Just skip both the delete and the add.
|
|
read() on routing socket fails. Just bail.
|
|
|
|
gateway (RTF_GATEWAY) routes. Thus catching and
flushing direct routes that could have been
added by dhclient.
|
|
|
|
Fix a missing != NULL, and add a comment on why no search
path and no dns servers means resolv.conf.tail is ignored.
|
|
|
|
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().
|
|
|
|
add_classless_static_routes() into set_routes(). One
less layer of abstraction and all five add_route()
invocations now in one place.
Clearly comment the route(8) command equivalents for each
add_route() invocation.
|
|
created when gateway == interface address.
|
|
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.
|
|
Use the macro from route(8) / ospf6d(8) since it works also with argument 0.
OK claudio@
|
|
are dead to the internet. And the current code actually creates /32
routes since kernel magic for classfull routes died a while ago.
ok phessler@ claudio@ reyk@ sthen@
|