]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
5 years agouse TEMP_PREFERRED/VALID_LIFETIME for OpenBSD 13/head
Stuart Henderson [Fri, 3 Apr 2020 12:23:49 +0000 (12:23 +0000)] 
use TEMP_PREFERRED/VALID_LIFETIME for OpenBSD

Shortly after dhcpcd started using these constants, they were dropped from OpenBSD kernel headers as they're only used by rad(8). Switch to dhcpcd's own constants instead, fixing build on recent -current.

5 years agoFix build without INET or INET6
Roy Marples [Thu, 2 Apr 2020 19:54:19 +0000 (19:54 +0000)] 
Fix build without INET or INET6

5 years agoRelease dhcpcd-9.0.0
Roy Marples [Thu, 2 Apr 2020 12:14:09 +0000 (13:14 +0100)] 
Release dhcpcd-9.0.0

5 years agoNote that setting pltime to zero for stale addresses isn't RFC compliant
Roy Marples [Wed, 1 Apr 2020 15:12:37 +0000 (16:12 +0100)] 
Note that setting pltime to zero for stale addresses isn't RFC compliant

But also note we need to do this to ensure the kernel tries to use
better addresses.

5 years agoresolv.conf: Uniquify contents
Roy Marples [Wed, 1 Apr 2020 12:22:15 +0000 (13:22 +0100)] 
resolv.conf: Uniquify contents

We might have >1 router that broadcasts the same DNS information.
While resolvconf(8) can easily take care of uniqifying the data,
not all systems have this nice tool so do the job here as well.

5 years agoND: Improve stale detection for >1 router
Roy Marples [Wed, 1 Apr 2020 11:19:47 +0000 (12:19 +0100)] 
ND: Improve stale detection for >1 router

5 years agoND: Check matching iface to make stale and add commentary
Roy Marples [Wed, 1 Apr 2020 08:16:47 +0000 (09:16 +0100)] 
ND: Check matching iface to make stale and add commentary

5 years agoND: If a secondary router adds the same prefix, use it's address
Roy Marples [Tue, 31 Mar 2020 21:33:25 +0000 (22:33 +0100)] 
ND: If a secondary router adds the same prefix, use it's address

With slaac private, it will generate a new address which would
be wrong.

5 years agoND: Only deprecate prefixes when all stale
Roy Marples [Tue, 31 Mar 2020 21:00:52 +0000 (22:00 +0100)] 
ND: Only deprecate prefixes when all stale

5 years agodhcpcd: disable address sanitization by default
Roy Marples [Tue, 31 Mar 2020 19:21:58 +0000 (20:21 +0100)] 
dhcpcd: disable address sanitization by default

As recent production kernels ship with ASLR by default which
stops dhcpcd running dead when this is enabled.
We dont want to break a systems boot, so force it via configure.

5 years agolinux: the default hostname is (none)
Roy Marples [Tue, 31 Mar 2020 18:45:17 +0000 (19:45 +0100)] 
linux: the default hostname is (none)

It's blank for the BSD's.
Respect this when relinquishing the hostname.

5 years agohostname: Default to blank instead of localhost
Roy Marples [Tue, 31 Mar 2020 17:23:05 +0000 (18:23 +0100)] 
hostname: Default to blank instead of localhost

No kernel sets a default value of localhost.

5 years agoDon't install /var/db/dhcpcd in the Makefile
Roy Marples [Tue, 31 Mar 2020 10:30:30 +0000 (11:30 +0100)] 
Don't install /var/db/dhcpcd in the Makefile

dhcpcd will create it in the right place by default.

5 years agoprivsep: Refuse chroot if privsep users home dir is /var/empty
Roy Marples [Mon, 30 Mar 2020 16:12:26 +0000 (17:12 +0100)] 
privsep: Refuse chroot if privsep users home dir is /var/empty

As we should not be filling it.
This means we don't mess up a stock install where the pkg admin
hasn't setup privsep correctly.

5 years agoBSD: Don't warn if the OS does not support miss filtering.
Roy Marples [Mon, 30 Mar 2020 15:56:12 +0000 (16:56 +0100)] 
BSD: Don't warn if the OS does not support miss filtering.

The compile warning is enough.

5 years agoFreeBSD: Remove unused compile warning
Roy Marples [Mon, 30 Mar 2020 15:36:30 +0000 (16:36 +0100)] 
FreeBSD: Remove unused compile warning

The actual warning about the lack of filtering is enough.

5 years agoscript: Start RA addresses from 1, not 0.
Roy Marples [Sat, 28 Mar 2020 17:52:52 +0000 (17:52 +0000)] 
script: Start RA addresses from 1, not 0.

5 years agodhcpcd: dump lease on the unpriviledged socket
Roy Marples [Sat, 28 Mar 2020 17:01:49 +0000 (17:01 +0000)] 
dhcpcd: dump lease on the unpriviledged socket

5 years agoFix compile on Linux
Roy Marples [Sat, 28 Mar 2020 16:05:28 +0000 (16:05 +0000)] 
Fix compile on Linux

5 years agodumplease: Separate ifaces
Roy Marples [Fri, 27 Mar 2020 22:07:14 +0000 (22:07 +0000)] 
dumplease: Separate ifaces

5 years agodhcpcd: dumping lease uses control socket to get the lease
Roy Marples [Fri, 27 Mar 2020 16:14:48 +0000 (16:14 +0000)] 
dhcpcd: dumping lease uses control socket to get the lease

Thanks to privsep it's hard to know where the lease is now stored.
As such, the only true location is from the running dhcpcd process.
The ability to read a raw lease from stdin has been dropped.

5 years agoprivsep: Don't close output streams if debugging or testing
Roy Marples [Fri, 27 Mar 2020 16:04:35 +0000 (16:04 +0000)] 
privsep: Don't close output streams if debugging or testing

5 years agooptions: move warning
Roy Marples [Fri, 27 Mar 2020 16:04:10 +0000 (16:04 +0000)] 
options: move warning

5 years agodhcpcd: Improve error when interface does not exist vs invalid config
Roy Marples [Tue, 17 Mar 2020 07:57:03 +0000 (07:57 +0000)] 
dhcpcd: Improve error when interface does not exist vs invalid config

5 years agoprivsep: Don't create DB directory in the real root as well.
Roy Marples [Sat, 14 Mar 2020 16:02:32 +0000 (16:02 +0000)] 
privsep: Don't create DB directory in the real root as well.

5 years agoBSD: use satosin6 rather than a direct cast
Roy Marples [Sat, 14 Mar 2020 10:40:22 +0000 (10:40 +0000)] 
BSD: use satosin6 rather than a direct cast

5 years agoRA: Prefer older routers at the preference
Roy Marples [Wed, 11 Mar 2020 01:11:41 +0000 (01:11 +0000)] 
RA: Prefer older routers at the preference

5 years agoIPv6ND: Mark stale addresses/prefixes with a pltime of zero.
Roy Marples [Tue, 10 Mar 2020 12:19:03 +0000 (12:19 +0000)] 
IPv6ND: Mark stale addresses/prefixes with a pltime of zero.

This mirrors DHCPv6 behaviour.

5 years agoIPv6ND: ap -> ia rototill
Roy Marples [Tue, 10 Mar 2020 12:17:58 +0000 (12:17 +0000)] 
IPv6ND: ap -> ia rototill

5 years agoRemove empty brace from prior
Roy Marples [Mon, 9 Mar 2020 10:34:14 +0000 (10:34 +0000)] 
Remove empty brace from prior

5 years agooptions: optimise token storage by reducing free calls
Roy Marples [Sun, 8 Mar 2020 21:37:50 +0000 (21:37 +0000)] 
options: optimise token storage by reducing free calls

Also avoid a potential memory issue if the malloc call to save the
key fails.

5 years agoDHCP: Move the max frame length check
Roy Marples [Wed, 4 Mar 2020 15:07:24 +0000 (15:07 +0000)] 
DHCP: Move the max frame length check

5 years agoDHCP: Appease LGTM finding unlikely user overflow from overself
Roy Marples [Sat, 22 Feb 2020 17:07:38 +0000 (17:07 +0000)] 
DHCP: Appease LGTM finding unlikely user overflow from overself

Only in privsep.

5 years agodhcpcd: don't report forked to background in quiet mode
Roy Marples [Sat, 22 Feb 2020 16:42:31 +0000 (16:42 +0000)] 
dhcpcd: don't report forked to background in quiet mode

5 years agoDHCP: Add support for the Microsoft User Class option
Roy Marples [Wed, 19 Feb 2020 18:14:28 +0000 (18:14 +0000)] 
DHCP: Add support for the Microsoft User Class option

Along with advice on how to set correctly the Vendor Class ID.
Also note this is not RFC compliant.

5 years agooptions: Define parse_nstring and use it
Roy Marples [Wed, 19 Feb 2020 11:15:49 +0000 (11:15 +0000)] 
options: Define parse_nstring and use it

Makes the code easier to read.
While here, use sizeof rather than size constants to make it
more clear of the length of the property we're copying to.

5 years agoDHCP6: Fix SMALL build
Roy Marples [Sun, 16 Feb 2020 13:32:54 +0000 (13:32 +0000)] 
DHCP6: Fix SMALL build

5 years agoprivsep: Fix build without ARP support
Roy Marples [Sun, 16 Feb 2020 13:32:13 +0000 (13:32 +0000)] 
privsep: Fix build without ARP support

5 years agoRevert "dhcp: Cast away a compile warning"
Roy Marples [Sun, 16 Feb 2020 09:38:57 +0000 (09:38 +0000)] 
Revert "dhcp: Cast away a compile warning"

This reverts commit ccf3a5e9fe4ea8f63cfcdb27f96b02ec2cc8ff70.
This has been determined to be a gcc bug and will be worked
around another way in the build system.

5 years agoif: Decode vlid from the interface name
Roy Marples [Sat, 15 Feb 2020 01:50:31 +0000 (01:50 +0000)] 
if: Decode vlid from the interface name

This just clarifies the former fix

5 years agoif: . is part of the interface name, not an alias
Roy Marples [Sat, 15 Feb 2020 01:29:13 +0000 (01:29 +0000)] 
if: . is part of the interface name, not an alias

5 years agonet: If if_learnaddrs fails unexpectedly, log address and interface
Roy Marples [Fri, 14 Feb 2020 06:47:40 +0000 (06:47 +0000)] 
net: If if_learnaddrs fails unexpectedly, log address and interface

This will greatly aid debugging.

5 years agoBe pedantic and move syslog.h into the right place
Roy Marples [Tue, 11 Feb 2020 11:20:58 +0000 (11:20 +0000)] 
Be pedantic and move syslog.h into the right place

5 years agologerr: Use macros to call log functions
Sergey Nikiforov [Tue, 11 Feb 2020 11:07:13 +0000 (11:07 +0000)] 
logerr: Use macros to call log functions

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__.

5 years agoprivsep: Don't run the CHROOT hook if we can't init privsep.
Roy Marples [Mon, 10 Feb 2020 22:08:26 +0000 (22:08 +0000)] 
privsep: Don't run the CHROOT hook if we can't init privsep.

5 years agoanother typo
Roy Marples [Mon, 10 Feb 2020 14:35:08 +0000 (14:35 +0000)] 
another typo

5 years agospelling: Correct both privilege and separation
Roy Marples [Mon, 10 Feb 2020 13:26:30 +0000 (13:26 +0000)] 
spelling: Correct both privilege and separation

Found by Arfrever.

5 years agoinet6: guard getting RA routers if inet6 not initialised
Roy Marples [Sun, 9 Feb 2020 18:54:29 +0000 (18:54 +0000)] 
inet6: guard getting RA routers if inet6 not initialised

Now that we get inet6 routes even when only building inet routes
we need to guard as the RA routers collection could be NULL.

5 years agoBSD: Fix processing RTM_MISS for non NetBSD BSDs
Roy Marples [Sun, 9 Feb 2020 16:57:27 +0000 (16:57 +0000)] 
BSD: Fix processing RTM_MISS for non NetBSD BSDs

5 years agoBSD: Add support for RO_MISSFILTER route(4) socket option
Roy Marples [Sat, 8 Feb 2020 17:29:03 +0000 (17:29 +0000)] 
BSD: Add support for RO_MISSFILTER route(4) socket option

This allows dhcpcd to only listen for RTM_MISS generated by
default routers dhcpcd *could* install so if one becomes
unreachable we can pick another.

5 years agoDragonFlyBSD: Fix compile
Roy Marples [Fri, 7 Feb 2020 20:56:11 +0000 (20:56 +0000)] 
DragonFlyBSD: Fix compile

5 years agodhcpcd: randomise hardware address on start if no carrier
Roy Marples [Fri, 7 Feb 2020 15:04:25 +0000 (15:04 +0000)] 
dhcpcd: randomise hardware address on start if no carrier

For more anonymity.

5 years agodhcp: Cast away a compile warning
fox [Fri, 7 Feb 2020 14:13:59 +0000 (14:13 +0000)] 
dhcp: Cast away a compile warning

5 years agoLinux: mask the NETLINK_GET_STRICT_CHK: Protocol not available error
Roy Marples [Fri, 7 Feb 2020 13:16:06 +0000 (13:16 +0000)] 
Linux: mask the NETLINK_GET_STRICT_CHK: Protocol not available error

Just to appease Arch LTS users (packages are built with newer
headers than what kernel supports).

5 years agooptions: Improve AF_INET6 address parsing and logging
Roy Marples [Fri, 7 Feb 2020 12:52:51 +0000 (12:52 +0000)] 
options: Improve AF_INET6 address parsing and logging

5 years agoinet6: Calculate the prefix in the canonical form
Roy Marples [Fri, 7 Feb 2020 12:18:46 +0000 (12:18 +0000)] 
inet6: Calculate the prefix in the canonical form

Rather than being clever and getting it wrong.

5 years agoAdd an extra fallthrough to prior
Roy Marples [Thu, 6 Feb 2020 15:08:21 +0000 (15:08 +0000)] 
Add an extra fallthrough to prior

5 years agoinet6: Swap between DISCOVER and INFORM better
Roy Marples [Thu, 6 Feb 2020 14:59:24 +0000 (14:59 +0000)] 
inet6: Swap between DISCOVER and INFORM better

Most of the time this will be dictated by the RA, but let our
config decide as well.

5 years agoDHCP6: Clean up old lease when we fail to confirm/rebind, etc
Roy Marples [Thu, 6 Feb 2020 12:58:43 +0000 (12:58 +0000)] 
DHCP6: Clean up old lease when we fail to confirm/rebind, etc

Also removed the TIMEOUT states which makes things easier to read.

5 years agoinet6: Ensure expired routers are cleared after a carrier loss
Roy Marples [Thu, 6 Feb 2020 12:54:11 +0000 (12:54 +0000)] 
inet6: Ensure expired routers are cleared after a carrier loss

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.

5 years agoeloop: define eloop queue numbers in common.h
Roy Marples [Thu, 6 Feb 2020 12:50:31 +0000 (12:50 +0000)] 
eloop: define eloop queue numbers in common.h

Allows for easier maintainance.

5 years agocompat: Fix a typo in pidfile when O_CLOEXEC is not defined
Petr Gotthard [Wed, 5 Feb 2020 15:35:44 +0000 (15:35 +0000)] 
compat: Fix a typo in pidfile when O_CLOEXEC is not defined

While here, include fcntl.h in if.c for older environments.

5 years agoDHCP: Fix receiving BPF from privsep.
Roy Marples [Wed, 5 Feb 2020 15:10:44 +0000 (15:10 +0000)] 
DHCP: Fix receiving BPF from privsep.

5 years agoARP: Only copy out frame header if we have it.
Roy Marples [Wed, 5 Feb 2020 14:54:49 +0000 (14:54 +0000)] 
ARP: Only copy out frame header if we have it.

Frameless does exist.

5 years agoARP: Recalculate ARP buffer taking into account max frame length
Roy Marples [Wed, 5 Feb 2020 14:38:04 +0000 (14:38 +0000)] 
ARP: Recalculate ARP buffer taking into account max frame length

5 years agoDHCP: Support jumbo frames
Roy Marples [Wed, 5 Feb 2020 14:05:51 +0000 (14:05 +0000)] 
DHCP: Support jumbo frames

Also important as we now need to store the frame header in the
initial buffer.

5 years agoBPF: Return the frame header with the data
Roy Marples [Wed, 5 Feb 2020 13:29:45 +0000 (13:29 +0000)] 
BPF: Return the frame header with the data

For DHCP, we then just skip over the frame header.
For ARP, we extract the frame source and destination addresses
so we can log the source in the event of a conflict.

This is important as a user has found a router which sets the ARP
source and destination hardware addresses to all zeros but unicasts
the ARP straight to our hardware address.

https://serverfault.com/questions/297425/ip-address-conflict-with-mac-address-000000000000
https://discussions.flightaware.com/t/piaware-wont-reconnect-to-wifi-network-if-it-drops-off/59789

5 years agoBSD: ignore XEN DOM0 virtual interface xvif
Roy Marples [Tue, 4 Feb 2020 16:30:29 +0000 (16:30 +0000)] 
BSD: ignore XEN DOM0 virtual interface xvif

5 years agoif: decode XEN vif1.2 and xvif1i2 as vif1:2
Roy Marples [Tue, 4 Feb 2020 16:29:07 +0000 (16:29 +0000)] 
if: decode XEN vif1.2 and xvif1i2 as vif1:2

5 years agoBSD: When applying RA base information, get info without privsep
Roy Marples [Tue, 4 Feb 2020 15:44:49 +0000 (15:44 +0000)] 
BSD: When applying RA base information, get info without privsep

privsep cannot current pass it back ..... duh

5 years agoRevert "BSD: When applying RA base information, ensure flags are correct"
Roy Marples [Tue, 4 Feb 2020 15:39:50 +0000 (15:39 +0000)] 
Revert "BSD: When applying RA base information, ensure flags are correct"

This reverts commit 8437a9be7c91dc24915d1fbc0cbe59618ebb1bbe.

5 years agoBSD: When applying RA base information, ensure flags are correct
Roy Marples [Tue, 4 Feb 2020 15:21:40 +0000 (15:21 +0000)] 
BSD: When applying RA base information, ensure flags are correct

For some resaon, under privsep only, SIOCGIFINFO_IN6 returns 0
in flags even though the kernel seems to set it correctly.
SIOCSIFINFO_IN6 *will* overwrite flags regardless, so ensure
it has the correct value for dhcpcd.

5 years agoStyle
Roy Marples [Tue, 4 Feb 2020 15:01:18 +0000 (15:01 +0000)] 
Style

5 years agoeloop: cast away a compile warning
Roy Marples [Tue, 4 Feb 2020 02:38:35 +0000 (02:38 +0000)] 
eloop: cast away a compile warning

5 years agoARP: add a comment to note ethernet padding upto 60 bytes.
Roy Marples [Fri, 31 Jan 2020 11:04:27 +0000 (11:04 +0000)] 
ARP: add a comment to note ethernet padding upto 60 bytes.

5 years agoBSD: Don't log an error failing to get inet6 adress flags
Roy Marples [Wed, 29 Jan 2020 17:06:34 +0000 (17:06 +0000)] 
BSD: Don't log an error failing to get inet6 adress flags

When the interface departs and we're validating route messages.
This mirrors inet.

5 years agoMention chroot
Roy Marples [Mon, 27 Jan 2020 21:47:24 +0000 (21:47 +0000)] 
Mention chroot

5 years agoIPv4LL: A state might not always exist when running the script.
Christos Zoulas [Mon, 27 Jan 2020 12:56:04 +0000 (12:56 +0000)] 
IPv4LL: A state might not always exist when running the script.

For example, we deleted existing IPv4LL addresses that dhcpcd
doesn't directly control when we obtained a DHCP lease.

5 years agoDHCP: redirect message to other interfaces if received for inactive
Roy Marples [Sun, 26 Jan 2020 16:44:40 +0000 (16:44 +0000)] 
DHCP: redirect message to other interfaces if received for inactive

This is unlikely but possible if you have a manual subnet route
via another interface you normally receive a DHCP address inside
this subnet.

Saves spamming the log that we received for an inactive interface
as well.

5 years agodhcpcd: report how large a route rocket receive buffer size we set
Roy Marples [Sun, 26 Jan 2020 15:58:51 +0000 (15:58 +0000)] 
dhcpcd: report how large a route rocket receive buffer size we set

5 years agodhcpcd: When route socket overflows, report how large it is.
Roy Marples [Sun, 26 Jan 2020 15:46:41 +0000 (15:46 +0000)] 
dhcpcd: When route socket overflows, report how large it is.

Of course Linux likes to double it, so cater for this.

5 years agoif: Don't use a variable length buffer
Roy Marples [Sun, 26 Jan 2020 15:46:16 +0000 (15:46 +0000)] 
if: Don't use a variable length buffer

Otherwise SSP complains.

5 years agodhcpcd: For anonymous do not bring interface up if was down
Roy Marples [Sat, 25 Jan 2020 13:27:36 +0000 (13:27 +0000)] 
dhcpcd: For anonymous do not bring interface up if was down

We need to bring the interface down on carrier loss to change the
hardware address, but we should only bring it up again if it was
up previously.

After all it's really an administrative flag.

5 years agoBSD: Fix INET flags on RTM_NEWADDR messages.
Roy Marples [Wed, 22 Jan 2020 19:25:14 +0000 (19:25 +0000)] 
BSD: Fix INET flags on RTM_NEWADDR messages.

5 years agoDHCP: Defend already configured static addresses
Roy Marples [Wed, 22 Jan 2020 17:15:30 +0000 (17:15 +0000)] 
DHCP: Defend already configured static addresses

5 years agoARP: Fix defend time check
Roy Marples [Wed, 22 Jan 2020 16:32:09 +0000 (16:32 +0000)] 
ARP: Fix defend time check

5 years agoprivsep: Fix compile on Linux
Roy Marples [Wed, 22 Jan 2020 16:24:38 +0000 (16:24 +0000)] 
privsep: Fix compile on Linux

setgroup requires <grp.h>

5 years agoDHCP: Take interface reference on Address Defend failure
Roy Marples [Wed, 22 Jan 2020 16:21:12 +0000 (16:21 +0000)] 
DHCP: Take interface reference on Address Defend failure

As the astate could be freed on dropping the DHCP state.

5 years agologging: Always log to syslog(3).
Roy Marples [Wed, 22 Jan 2020 12:00:10 +0000 (12:00 +0000)] 
logging: Always log to syslog(3).

--logfile may not work that well in a chroot on receipt of SIGUSR2
because the path is of course different.

Might have to drop this option soon as I have no good ideas
on how to resolve it :(

5 years agoRemove RC_SVCNAME.
Roy Marples [Tue, 21 Jan 2020 22:39:55 +0000 (22:39 +0000)] 
Remove RC_SVCNAME.

We've not used that for quite a while now.....

5 years agoprivsep: Note CHROOT script
Roy Marples [Tue, 21 Jan 2020 22:35:31 +0000 (22:35 +0000)] 
privsep: Note CHROOT script

While here make BUILDING.md match reality and fix a warning
compiling without privsep.

5 years agoLinux: setup mounts in chroot
Roy Marples [Tue, 21 Jan 2020 22:09:14 +0000 (22:09 +0000)] 
Linux: setup mounts in chroot

This allows dhcpcd to work.
udev sadly requires /run/udev as well, so heh ho.

5 years agoprivsep: Fix compile on Alpine Linux
Roy Marples [Tue, 21 Jan 2020 20:37:12 +0000 (20:37 +0000)] 
privsep: Fix compile on Alpine Linux

5 years agoprivsep: Only fetch PRIVSEP_USER at init
Roy Marples [Tue, 21 Jan 2020 20:17:27 +0000 (20:17 +0000)] 
privsep: Only fetch PRIVSEP_USER at init

And not each time it's needed - we don't want a sudden change in
the details to affect a running dhcpcd.

5 years agoprivsep: copy configuration file into chroot
Roy Marples [Tue, 21 Jan 2020 20:08:56 +0000 (20:08 +0000)] 
privsep: copy configuration file into chroot

Only if it has changed.
Saves having to maintian it outside of dhcpcdm in a script or
something.

5 years agoinet6: fix forced RA expiration for a given interface
Roy Marples [Tue, 21 Jan 2020 16:26:41 +0000 (16:26 +0000)] 
inet6: fix forced RA expiration for a given interface

5 years agoprivsep: chroot the master process
Roy Marples [Tue, 21 Jan 2020 16:17:18 +0000 (16:17 +0000)] 
privsep: chroot the master process

This means that the privileged actioneer process needs to cleanup
sockets and pidfile.
It also has some reliance on how dhcpcd is started to create
a decent chroot area AND copy the configuration file to it.

5 years agoprivsep: Close stdout/stderr after forking processes
Roy Marples [Tue, 21 Jan 2020 16:11:37 +0000 (16:11 +0000)] 
privsep: Close stdout/stderr after forking processes

Well, redirect them to /dev/null anyway.
Also tidy a few things in common whilst here.

5 years agoBSD: Improve RTM_NEWADDR/RTM_DELADDR validaton some more
Roy Marples [Tue, 21 Jan 2020 12:01:02 +0000 (12:01 +0000)] 
BSD: Improve RTM_NEWADDR/RTM_DELADDR validaton some more

5 years agoOnly ignore address messages from ourself for deletion.
Roy Marples [Mon, 20 Jan 2020 11:59:06 +0000 (11:59 +0000)] 
Only ignore address messages from ourself for deletion.

We need to process addition for flag changes.