]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Mark Davies [Tue, 21 Apr 2020 09:34:09 +0000 (10:34 +0100)]
hostname: Ensure it's not clobbered by SLAAC
Because it cannot carry a hostname and user could be forcing it.
Roy Marples [Tue, 21 Apr 2020 09:32:00 +0000 (10:32 +0100)]
Release dhcpcd-9.0.2
Roy Marples [Tue, 21 Apr 2020 08:55:50 +0000 (09:55 +0100)]
align CMSG buffer
Roy Marples [Mon, 20 Apr 2020 21:18:41 +0000 (22:18 +0100)]
DHCP: Avoid mis-aligned BOOTP structure
This was caused by the recent change to pass back the frame header.
Roy Marples [Mon, 20 Apr 2020 14:31:57 +0000 (15:31 +0100)]
OpenBSD: set IN6_IFF_AUTOCONF for addresses generated from a RA
NetBSD will follow suit once the code in the kernel to handle RA
has been removed.
Roy Marples [Mon, 20 Apr 2020 13:11:00 +0000 (14:11 +0100)]
if: ensure interface flags persist when setting a flag
Otherwise we stupidly drop IFF_MULTICAST on Linux.
Roy Marples [Sun, 19 Apr 2020 06:52:47 +0000 (07:52 +0100)]
inet6: Add 'temporary' directive to the slaac option
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.
Roy Marples [Sun, 19 Apr 2020 04:33:53 +0000 (05:33 +0100)]
BSD: Dont warn if the kernel does not support flushing routers
As the implemention might be removed one day.
Roy Marples [Fri, 17 Apr 2020 12:25:33 +0000 (13:25 +0100)]
DHCP6: don't log when things consitently fail
For example, the RA says obtain more inforamtion via DHCPv6 but
there is no DHCPv6 server to service the request.
Roy Marples [Fri, 17 Apr 2020 12:22:54 +0000 (13:22 +0100)]
inet6: Only log RA's when they are from a new server
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.
Roy Marples [Thu, 16 Apr 2020 22:28:34 +0000 (23:28 +0100)]
inet6: Don't regen temporary addresses without an IPv6 state
As this is not possible.
Roy Marples [Thu, 16 Apr 2020 22:27:47 +0000 (23:27 +0100)]
dhcpcd: daemomize if no valid interfaces found
But if we're waitig for an ip address we still wait.
Roy Marples [Thu, 16 Apr 2020 22:26:49 +0000 (23:26 +0100)]
configure: Set a blank default hostname for non Linux
Wups, I was debugging.
Roy Marples [Thu, 16 Apr 2020 20:00:58 +0000 (21:00 +0100)]
privsep: Don't abort if we fail to init a protocol.
It's only an error if we cannot init anything.
Roy Marples [Wed, 15 Apr 2020 15:50:32 +0000 (16:50 +0100)]
privsep: Redirect to /dev/null unless test or quiet and not debug
Keeps the rtsol like behaviour the same.
Roy Marples [Wed, 15 Apr 2020 15:50:11 +0000 (16:50 +0100)]
Don't open a control socket in test mode.
Roy Marples [Mon, 13 Apr 2020 15:09:08 +0000 (16:09 +0100)]
Release dhcpcd-9.0.1
Roy Marples [Sun, 5 Apr 2020 15:50:59 +0000 (16:50 +0100)]
install: Dont move old files around to new locations
privsep user dir may not exist and this code wont work for
dhcpcd-9 anyway.
Roy Marples [Sun, 5 Apr 2020 15:47:25 +0000 (16:47 +0100)]
Note /dev/log issue on linux
Roy Marples [Sun, 5 Apr 2020 15:44:32 +0000 (16:44 +0100)]
privsep: Detect a suitable user for dhcpcd, otherwise use dhcpcd
System users generally have _ preceeding their username.
Only use this user if it exists and their home dir is not /var/empty.
Otherwise default to using dhcpcd.
Roy Marples [Sun, 5 Apr 2020 14:52:50 +0000 (15:52 +0100)]
Revert "privsep: default to using _dhcpcd and not _dhcp"
This reverts commit
36c47a8df0951236a7842bbf8241e2932357ef61 .
Roy Marples [Fri, 10 Apr 2020 09:17:38 +0000 (10:17 +0100)]
privsep: default to using _dhcpcd and not _dhcp
_dhcp home dir defaults to /var/empty.
System integrators can and should be in charge of changing it when needed.
Packagers on the other hand don't have such a luxury and so should not
use _dhcp by default.
Roy Marples [Thu, 9 Apr 2020 21:29:46 +0000 (22:29 +0100)]
linux: Remove warning when HAVE_IN6_ADDR_GEN_MODE_NONE isn't supported
Roy Marples [Thu, 9 Apr 2020 20:55:33 +0000 (21:55 +0100)]
route: revert prior change to rt_new0
Roy Marples [Thu, 9 Apr 2020 20:08:05 +0000 (21:08 +0100)]
dhcpcd: always emit version when starting.
Roy Marples [Thu, 9 Apr 2020 16:27:18 +0000 (16:27 +0000)]
RTA_PREF was added in kernel-4.1
Roy Marples [Thu, 9 Apr 2020 16:19:07 +0000 (16:19 +0000)]
Linux: Note router preference when adding routes
This appears to just be cosmetic.
Roy Marples [Thu, 9 Apr 2020 15:38:18 +0000 (15:38 +0000)]
Linux: doesn't need to create temp addrs
Roy Marples [Thu, 9 Apr 2020 15:36:42 +0000 (16:36 +0100)]
Fix build on Linux
Roy Marples [Thu, 9 Apr 2020 15:16:37 +0000 (16:16 +0100)]
RA: Rework temporary address management
Vastly simpfly how they are generated and managed.
Temporary address generation now uses pure random numbers
rather than MD5ing over a random secret as arc4random should be
random enough. This change reflects RFC 4941bis.
Roy Marples [Wed, 8 Apr 2020 19:12:08 +0000 (20:12 +0100)]
linux: mount --bind real directory holding /dev/log
As systemd has the real socket in /run which doesn't help anyone
but itself.
Roy Marples [Tue, 7 Apr 2020 12:18:35 +0000 (13:18 +0100)]
BSD: Fix temporary address management
Roy Marples [Mon, 6 Apr 2020 20:13:39 +0000 (21:13 +0100)]
privsep: Don't overwrite initial sigmask
We really don't want to do that ....
Christos Zoulas [Mon, 6 Apr 2020 20:11:45 +0000 (21:11 +0100)]
scripts: Run with an empty sigmask
An empty signal mask is probably more appropriate, since most
programs presume that the signal mask is empty when they start
even when they are using signals.
Roy Marples [Sun, 5 Apr 2020 06:47:14 +0000 (07:47 +0100)]
privsep: If we fail to init privsep, continue
We continue if the privsep user cannot be found, so do the same
if passwd or similar is missing from the system.
This helps people who use dhcpcd in ramdisks to oneshot the config
for example to start iSCSI.
Roy Marples [Tue, 31 Mar 2020 10:51:24 +0000 (11:51 +0100)]
dhcpcd: dump all variables and optionally all interfaces
This allows someone to view pretty much the whole state.
Roy Marples [Mon, 30 Mar 2020 20:40:19 +0000 (21:40 +0100)]
privsep: Improve error when we cannot write the lease
No permission without context isn't great.
Roy Marples [Mon, 30 Mar 2020 20:40:04 +0000 (21:40 +0100)]
hooks: Build all hooks before installing
Roy Marples [Mon, 30 Mar 2020 20:21:47 +0000 (21:21 +0100)]
hooks: clean 30-hostname
As it's now built from 30-hostname.in
Roy Marples [Mon, 30 Mar 2020 20:20:12 +0000 (21:20 +0100)]
hooks: Remove 02-dump
As we now dump via the control socket, this is no longer needed.
Roy Marples [Mon, 30 Mar 2020 17:15:07 +0000 (18:15 +0100)]
BSD: Don't install 00-linux hook
Roy Marples [Fri, 3 Apr 2020 18:05:41 +0000 (18:05 +0000)]
Linux: improve IPv6 router reachability
Only mark as unreachable for NUD_FAILED.
Sadly the kernel emits this when the NDP entry is deleted for
whatever reason, which looks like a bug in the kernel.
Roy Marples [Fri, 3 Apr 2020 15:10:57 +0000 (16:10 +0100)]
Merge pull request #13 from sthen/patch-1
use TEMP_PREFERRED/VALID_LIFETIME for OpenBSD
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.
Roy Marples [Thu, 2 Apr 2020 19:54:19 +0000 (19:54 +0000)]
Fix build without INET or INET6
Roy Marples [Thu, 2 Apr 2020 12:14:09 +0000 (13:14 +0100)]
Release dhcpcd-9.0.0
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.
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.
Roy Marples [Wed, 1 Apr 2020 11:19:47 +0000 (12:19 +0100)]
ND: Improve stale detection for >1 router
Roy Marples [Wed, 1 Apr 2020 08:16:47 +0000 (09:16 +0100)]
ND: Check matching iface to make stale and add commentary
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.
Roy Marples [Tue, 31 Mar 2020 21:00:52 +0000 (22:00 +0100)]
ND: Only deprecate prefixes when all stale
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.
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.
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.
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.
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.
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.
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.
Roy Marples [Sat, 28 Mar 2020 17:52:52 +0000 (17:52 +0000)]
script: Start RA addresses from 1, not 0.
Roy Marples [Sat, 28 Mar 2020 17:01:49 +0000 (17:01 +0000)]
dhcpcd: dump lease on the unpriviledged socket
Roy Marples [Sat, 28 Mar 2020 16:05:28 +0000 (16:05 +0000)]
Fix compile on Linux
Roy Marples [Fri, 27 Mar 2020 22:07:14 +0000 (22:07 +0000)]
dumplease: Separate ifaces
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.
Roy Marples [Fri, 27 Mar 2020 16:04:35 +0000 (16:04 +0000)]
privsep: Don't close output streams if debugging or testing
Roy Marples [Fri, 27 Mar 2020 16:04:10 +0000 (16:04 +0000)]
options: move warning
Roy Marples [Tue, 17 Mar 2020 07:57:03 +0000 (07:57 +0000)]
dhcpcd: Improve error when interface does not exist vs invalid config
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.
Roy Marples [Sat, 14 Mar 2020 10:40:22 +0000 (10:40 +0000)]
BSD: use satosin6 rather than a direct cast
Roy Marples [Wed, 11 Mar 2020 01:11:41 +0000 (01:11 +0000)]
RA: Prefer older routers at the preference
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.
Roy Marples [Tue, 10 Mar 2020 12:17:58 +0000 (12:17 +0000)]
IPv6ND: ap -> ia rototill
Roy Marples [Mon, 9 Mar 2020 10:34:14 +0000 (10:34 +0000)]
Remove empty brace from prior
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.
Roy Marples [Wed, 4 Mar 2020 15:07:24 +0000 (15:07 +0000)]
DHCP: Move the max frame length check
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.
Roy Marples [Sat, 22 Feb 2020 16:42:31 +0000 (16:42 +0000)]
dhcpcd: don't report forked to background in quiet mode
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.
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.
Roy Marples [Sun, 16 Feb 2020 13:32:54 +0000 (13:32 +0000)]
DHCP6: Fix SMALL build
Roy Marples [Sun, 16 Feb 2020 13:32:13 +0000 (13:32 +0000)]
privsep: Fix build without ARP support
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.
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
Roy Marples [Sat, 15 Feb 2020 01:29:13 +0000 (01:29 +0000)]
if: . is part of the interface name, not an alias
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.
Roy Marples [Tue, 11 Feb 2020 11:20:58 +0000 (11:20 +0000)]
Be pedantic and move syslog.h into the right place
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__.
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.
Roy Marples [Mon, 10 Feb 2020 14:35:08 +0000 (14:35 +0000)]
another typo
Roy Marples [Mon, 10 Feb 2020 13:26:30 +0000 (13:26 +0000)]
spelling: Correct both privilege and separation
Found by Arfrever.
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.
Roy Marples [Sun, 9 Feb 2020 16:57:27 +0000 (16:57 +0000)]
BSD: Fix processing RTM_MISS for non NetBSD BSDs
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.
Roy Marples [Fri, 7 Feb 2020 20:56:11 +0000 (20:56 +0000)]
DragonFlyBSD: Fix compile
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.
fox [Fri, 7 Feb 2020 14:13:59 +0000 (14:13 +0000)]
dhcp: Cast away a compile warning
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).
Roy Marples [Fri, 7 Feb 2020 12:52:51 +0000 (12:52 +0000)]
options: Improve AF_INET6 address parsing and logging
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.
Roy Marples [Thu, 6 Feb 2020 15:08:21 +0000 (15:08 +0000)]
Add an extra fallthrough to prior