Commit Graph

17 Commits

Author SHA1 Message Date
Roy Marples
3547ed19f0 hooks: add NOCARRIER_ROAMING reason
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
2020-12-27 19:53:31 +00:00
Roy Marples
2f16f1f624 eloop: Just use ppoll(2)
epoll and kqueue are really too heavy weight.
With privsep, we now favour more processes for BPF and per address sockets.
As such, the number of fds to monitor will always be quite small.

All modern OS now have ppoll(2) (NetBSD has pollts, which is the same)
which works perfectly for us.
If neither are present, the a wrapper around pselect(2) is provided,
which can be found on all POSIX systems.

This makes the code a lot smaller and easier to follow.
The reduced binary size and memory usage is a nice win here.
2020-06-03 23:30:08 +01:00
Roy Marples
12b0db43b2 privsep: Allow Linux to work without needing any mounts 2020-05-24 05:47:14 +00:00
Roy Marples
a2dafdcabb We nolonger use getline. 2020-05-12 11:24:42 +01:00
Roy Marples
e97206ac7b Note /dev/log issue on linux 2020-04-05 16:47:25 +01:00
Roy Marples
5b5da4e5b1 Remove RC_SVCNAME.
We've not used that for quite a while now.....
2020-01-21 22:39:55 +00:00
Roy Marples
7e1f8b8e74 privsep: Note CHROOT script
While here make BUILDING.md match reality and fix a warning
compiling without privsep.
2020-01-21 22:35:31 +00:00
Roy Marples
0e0af1e67a Correct URL in prior 2019-12-17 15:57:18 +00:00
Roy Marples
b156d1bf48 Note some compilation issues and how to solve them. 2019-12-17 15:48:37 +00:00
Roy Marples
6502584888 privsep: Add support for priviledge separation
Not enabled by default - enable with ./configure --enable-privsep
Requires a user added to the system - default _dhcpcd

Several processes will be spawned off the main state engine:
a privileged actioneer and a generic network proxy.
Only the privileged actioneer process will retain root permissions.

When required, the privileged actioneer will also spawn
BPF listeners for BOOTP (DHCP) and ARP.
The BOOTP BPF listener should be a short lived process.
On kernels with RFC 5227 support, the ARP BPF listener will only
be used for ARPing and announcing a preferred address and will
also be a short lived process.

When not running in master mode, an address listener will be
spawned for each address (with the exception of RA dervived addresses)
dhcpcd cares about.

TODO:
 * Solaris support.
 * ARP BPF address filtering.
2019-11-28 16:41:15 +00:00
Roy Marples
8fa872768e build: Allow DESTDIR to work for import as well. 2019-08-28 22:30:52 +01:00
Roy Marples
cdda6e4a8f build: Note import-src target. 2019-08-28 21:59:28 +01:00
Roy Marples
7b3d01262b Remove ND6 Advertisement from SMALL builds.
This is quite a saving and is only used for IP6 address sharing
which only works on NetBSD.
2019-07-25 17:20:41 +01:00
Roy Marples
d8fab20459 Remove gmake-4 note, gmake-3 works again.
Might require newer gmake-4, but heh ho.
2019-02-11 18:07:25 +00:00
Roy Marples
12cc2d9946 Write syslog entries in logfile:
date tag[pid]: message
This does add a few more bytes, but it allows for the same log
analysis tools to be used.
When building SMALL, this code is removed and you just get the
message in the logfile.
2017-04-11 18:04:03 +01:00
Roy Marples
bedb9e645f Markdown improvements. 2017-03-14 23:08:19 +00:00
Roy Marples
ea753156eb Use some markdown loving. 2017-03-14 23:02:40 +00:00