| Commit message (Collapse) | Author | Age |
| ... | |
| | |
|
| | |
|
| |
|
|
|
| |
Otherwise we have a connection refused when dhcpcd starts again
as it sees the stale socket file.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do this by ensuring the events list or pollfd struct storage
is not modified during the revent processing.
An event with a fd of -1 means it's been deleted and one without
a pollfd struct reference has been newly added.
This also allows us to count down the number of fd's that
returned a revent so we can break the loop early if possible.
This is a really minor optimisation that at best only applies if
more than one revent is returned via poll(2).
In the case on dhcpcd on NetBSD with privsep, the number of
fd's is really low. And on other platforms or without privsep it's
low also (just not as low).
It's only when you run dhcpcd per interface that the number
of fd's starts to creep upwards as you then need one per address
dhcpcd is monitoring (as well as the ARP listener per IPv4 address
for non NetBSD).
However, I use eloop in other code where this could be a good saving
and dhcpcd is where the master version of this lives!
|
| |
|
|
|
| |
OpenBSD allows matching priorities, so we need to take the interfaces
in the order given to ensure uniqueness.
|
| | |
|
| | |
|
| |
|
|
| |
A 3rd party might want to control the randomisation.
|
| | |
|
| |
|
|
|
|
| |
This solves the warnings on all OS other than Linux who don't have
a supporting resolvconf for deprecating DNS because they never
emit the NOCARRIER_ROAMING reason.
|
| | |
|
| |
|
|
| |
We can now remove the NOCARRIER_PRESERVE_IP define.
|
| |
|
|
| |
We can use IN_IFF_TENTATIVE for this.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is given when the OS supports the concept of wireless roaming
or the IP setup can be persisted when the carrier drops.
When this happens, routes are moved to a higher metric (if supported)
to support non preferred but non roaming routes.
The `interface_order` hook variable will now order the interfaces
according to priority and move roaming interfaces to the back of the
list.
If resolvconf is present then it is called with the -C option
to deprecate DNS and if carrier comes back it is called again with the
-c option to activate it once more.
As part of this change, default route metrics have been changed to
support a larger number of interfaces.
base metric 1000 (was 200)
wireless offset 2000 (was 100)
IPv4LL offset 1000000 (was 10000)
roaming offset 2000000
|
| |
|
|
|
|
|
|
|
|
|
| |
Since version 9.3.3 and commit a5348dd02c86fa940cd93f203d0aa974cae0563c,
build without fork or signals fails on:
dhcpcd.c: In function ‘main’:
dhcpcd.c:2261:3: error: label ‘start_master’ used but not defined
goto start_master;
^~~~
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
| | |
|
| |
|
|
| |
They have no plans to add it either, so just hardcode AArch64.
|
| |
|
|
|
|
| |
Rather than accept(2), recv(2), etc..... which is horrible!
Thanks to Steve Hirsch <stevehirsch49@msn.com> for testing.
|
| | |
|
| |
|
|
| |
For when the link socket overflows
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
The master process will catch this clean remove the BPF process.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
If a value is given, it overrides /var/db/dhcpcd/duid.
|
| |
|
|
| |
This only works for non master mode.
|
| |
|
|
|
|
| |
Otherwise we loop.
It's unlikely oneshot would be used with IPv6 due to addresses
having lifetimes.
|
| |
|
|
|
| |
Fixes an issue on Linux where the headers advertise something
newer than what the kernel actually provides.
|
| | |
|
| |
|
|
| |
This was broken with the --noconfigure option in dhcpcd-9.3.3
|
| |
|
|
| |
lo0 won't have a configuration for example.
|
| | |
|
| | |
|
| |
|
|
| |
Note that this is a requirement for printf over serial terminals.
|
| |
|
|
|
| |
printf on some platforms seems to require it.
Without this, script_dump() may fault.
|
| |
|
|
| |
We already allow fcntl and fstat so this is not a problem.
|
| | |
|
| |
|
|
| |
There is little point.
|
| |
|
|
| |
This allows `dhcpcd -U4 eth0` to work once more.
|
| | |
|
| |
|
|
|
| |
With this set dhcpcd will not configure anything on the host.
The expectation is that a 3rd party script will instead.
|
| |
|
| |
Co-authored-by: Ted Feng <Ted.Feng@Aviatnet.com>
|
| |
|
|
| |
This is important for better NetworkManager support.
|
| | |
|