| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
Just have the one callback, but return an abstracted event mask
to work out if we can read/write have something else.
Log diagnostics if the event mask is unexpected.
While here add more logging if we fail to register an event to
monitor.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is achieved by checking that the interface is wireless,
IFF_UP and IFF_LOWER_UP are present, but IFF_RUNNING is missing.
This gives exactly the same support as modern NetBSD when carrier
loss is detected, but without the address verifications when the
carrier comes back as that needs to be handled in the kernel.
While IP setup is maintained, other configuration data is discarded.
Note that this should be improved in the future.
Thanks to Boris Krasnovskiy <borkra@gmail.com> for helping with this.
|
| |
|
|
|
| |
With this set dhcpcd will not configure anything on the host.
The expectation is that a 3rd party script will instead.
|
| |
|
|
|
|
|
| |
Move the IS_LINK_UP macro to if_is_link_up function to reduce
binary size.
Rather than DHCPCD_LINK option controlling the carrier state,
use it in if_is_link_up to determine the outcome.
|
| |
|
|
|
|
| |
Removes the need for the LINK_DOWN_IFFUP state.
While here, remove the check for IFF_RUNNING when LINK_UNKNOWN
because that is OS specific.
|
| | |
|
| |
|
|
|
| |
Per interface forwarding is apparently only for setting things
like IsRouter in NA messages.
|
| |
|
|
| |
Fixes a minor regression from prior.
|
| | |
|
| |
|
|
|
| |
This is RFC6275. dhcpcd is not a client suitable for this,
but it will at least decode the information properly.
|
| | |
|
| |
|
|
|
| |
We might have received data for an interface before
its been initialised.
|
| | |
|
| |
|
|
| |
But if_init is failing? Odd as this has not changed.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Except for the priviledged process.
This is quite an in-depth change:
* ARP is now one process per address
* BPF flags are now returned via privsep
* BPF write filters are locked when supported
* The root process sends to the network
The last step is done by opening RAW sockets and then sending a UDP
header (where applicable) to avoid binding to an address
which is already in use by the reader sockets.
This is slightly wasteful for OS's without sandboxing but does
have the very nice side effect of not needing a source address
to unicast DHCPs replies from which makes the code smaller.
|
| | |
|
| |
|
|
|
|
| |
Big wup!
While here, ensure buffer is aligned to the structure we want
to read.
|
| |
|
|
|
| |
Overrides the directory to chroot to away from the privilege separation
users home directory.
|
| |
|
|
|
|
|
|
| |
Other OS will just remove the RA's on carrier down and thus set
default values, but not so on NetBSD.
As such as need to set default values just before settings any values
from the incoming RA.
This allows us to change networks sensibly.
|
| |
|
|
| |
Otherwise the timing is slightly confused.
|
| |
|
|
| |
If there is no such RA, then apply some defaults.
|
| | |
|
| |
|
|
|
|
| |
This is the final piece of DHCP6 to implement!
Part of this change drops the use of the IPV6_AF_DUPLICATED flag
and we just use IN6_IFF_DUPLICATED now.
|
| | |
|
| |
|
|
|
|
|
|
| |
This instructs dhcpcd to create a temporary address for each
address generated from a RA.
As such, dhcpcd no longer looks at the kernel option for it
as the functionality is being removed from some or never existed
in the first place.
|
| |
|
|
|
|
|
| |
We cannot log them normally as there are implementations which
vary the expiry times based on their own times so each message is
different. As such, we only log from new servers or coming back
from expiration.
|
| |
|
|
| |
This appears to just be cosmetic.
|
| |
|
|
|
| |
But also note we need to do this to ensure the kernel tries to use
better addresses.
|
| | |
|
| | |
|
| |
|
|
|
| |
With slaac private, it will generate a new address which would
be wrong.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This mirrors DHCPv6 behaviour.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This allows downstream implementions to inject their own data
into the log message and/or supply new logging targets whilst
preserving macros such as __FILE__ and __LINE__.
|
| |
|
|
|
| |
Most of the time this will be dictated by the RA, but let our
config decide as well.
|
| |
|
|
|
|
|
|
|
|
| |
When we lose carrier, mark all RAs as willexpire and add
the timeout to expire to it's own queue.
On receipt of a matching RA, clear the willexpire flag.
When the above timeout occours, set doexpire on all
RA's with withexpire and then call the general expirera function.
This is needed because expirera can be called at any point.
|
| |
|
|
| |
Allows for easier maintainance.
|
| | |
|
| |
|
|
| |
Not all prefixes are autoconfable.
|
| |
|
|
| |
Rather than the address. Otherwise it looks wierd.
|
| |
|
|
| |
Cater for various prefix lengths when using temporay addresses.
|
| | |
|
| |
|
|
| |
Newest routers are added at the end, so we prefer newest anyway.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This saves the need to store a created date per timer, we just need
to know when the timers were last changed which we can store in the
eloop.
This makes it easier to make the actual timeout for polling.
While here, add the eloop_timespec_diff function to workout the
elapsed time from usp to tsp even when time has wrapped on one or
both times.
This works if time wraps on the maximal size time_t allows AND
we know that tsp is always newer than usp.
|