Commit Graph

377 Commits

Author SHA1 Message Date
rin b15419e6c4 For SMALLPROG, do not compile in IPv6 support unless SMALLPROG_INET6 is
defined, as in the same manner as other utilities.
2021-02-25 07:55:53 +00:00
roy 5311ca77c4 Sync with dhcpcd-9.4.0 2020-12-28 13:57:40 +00:00
roy f7c1f2f087 Update to dhcpcd-9.4.0 with the following changes:
* DHCP: For anonymous, just use a generic ClientID
 * link: Split hardware address randomisation out of anonymous option
 * link: Only report hardware changes for active interfaces
 * link: Report errors obtaining recv buffer size on overflow
 * hooks: Add NOCARRIER_ROAMING reason
 * hooks: interface_order now reflects priorities again
2020-12-28 13:56:25 +00:00
roy 5e88f5cfd3 Sync with dhcpcd-9.3.4 2020-11-28 14:27:20 +00:00
roy 5e29b77e59 Upate to dhcpcd-9.3.4 with the following changes:
With the following changes:
 * DHCP: If error adding the address in oneshot, exit with failure
 * DHCP: Only listen to the address if we successfully added it
 * DHCP6: Fix segfault introduced in dhcpcd-9.3.3
 * DHCP6: Abort in test mode when an error is returned by server
 * options: allow --ia_na=1 and --ia_pd=2 on the command line
 * options: Allow duid to take a value
2020-11-28 14:26:16 +00:00
roy 86988fb56b Sync with dhcpcd-9.3.3 2020-11-20 13:24:58 +00:00
roy d55488a43d Update to dhcpcd-9.3.3 with the following changes:
* dhcpcd: Don't create a launcher process if keeping in foreground
 * dhcpcd: Add --noconfigure option
 * control: Create an unpriv socket for non master mode
 * options: Don't log unknown ones when printing pidfile location
2020-11-20 13:23:38 +00:00
roy 8790575961 Sync with dhcpcd-9.3.2 2020-11-01 14:24:01 +00:00
roy 545ab76352 Update to dhcpcd-9.3.2 with the following changes:
* DHCP: Add support for IPv6-Only Preferred option, RFC 8925.
 * BSD: `LINK_STATE_UNKNOWN` is treated as UP once again
 * privsep: pass logging to the privileged actioneer
 * privsep: allow logfile re-opening to work
 * privsep: close BPF socket on ENXIO
 * privsep: don't leave a BOOTP BPF listener rebooting in non master mode
2020-11-01 14:23:02 +00:00
roy 0a9e4e74f0 Sync withn dhcpcd-9.3.1 2020-10-12 14:09:03 +00:00
roy 597ffba2d5 Update to dhcpcd-9.3.1 with the following changes:
* dhcpcd: carrier handling issue fixed from 9.3.0
 * dhcpcd: log if interface type is unsupported in debug
 * duid: memory leak fixed if UUID wanted but none available
 * privsep: fix receiving inet and no BPF running
 * privsep: allow gettimeofday for SECCOMP
 * privsep: fix stderr redirection again
2020-10-12 14:07:55 +00:00
roy be38669a3c Sync with dhcpcd-9.3.0 2020-10-05 16:02:15 +00:00
roy 32fe301ab8 Update to dhcpcd-9.3.0 with the following changes:
* dhcpcd: Backticks have been removed from quoting filenames
 * dhcpcd: Only manipulate stdin, stdout and stderr if they are valid
 * duid: Adjust option so the type can be specified
 * logerr: Don't leak logfile fd to scripts
 * privsep: Run the launcher process in the sandbox
 * BSD: Use `ifi_link_state` as the single source of truth about carrier
 * BSD: Ignore vether(4) devices by default
2020-10-05 16:01:13 +00:00
roy 3ace96f44a dhcpcd: Use ppoll(2) 2020-09-06 14:57:18 +00:00
roy 529fe136c2 Sync 2020-09-06 14:55:34 +00:00
roy b4100df48f Update to dhcpcd-9.2.0 with the following changes:
* route: ensure IPv4LL routes come last in priority
 * DHCP: fix many issues with extending the last lease
 * privsep: don't read control group from config in privsep
 * privsep: only the master process responds to signals
 * privsep: use a socketpair for stderr/stdin rather than dupping /dev/null
 * privsep: right limit stdin/stderr/stdout
 * privsep: dumping a lease is now run in a sandbox
 * options: check if kernel supports INET or INET6 before enabling default
 * options: let clientid override a prior duid
 * options: allow -1 to represent infinity for requested lease time
 * dhcpcd: fix a crash initing a new interface after route overflow
2020-09-06 14:54:28 +00:00
roy 61fe7a6beb Sync 2020-07-03 10:46:45 +00:00
roy 1d3a3c99fc Update to dhcpcd-9.1.4 with the following changes:
* Fix SMALL builds
 * Ensure DBDIR exists at startup
2020-07-03 10:45:43 +00:00
roy 95af55eb59 dhcpcd: Fix SMALL build 2020-07-02 17:15:00 +00:00
roy 2fc7a081d2 Sync 2020-07-02 13:59:19 +00:00
roy a43a146444 Update to dhcpcd-9.1.3 with the following changes:
* inet6: Add support for reporting Mobile IPv6 RA's
 * inet6: Report RA Proxy flag if set
 * BSD: Allow non NetBSD and OpenBSD to set IN6_IFF_AUTOCONF
 * privsep: Don't handle any signals meant for the main process
 * eloop: Try and survive a signal storm
 * dhcpcd: Add an option to poll the interface carrier state
 * script: Make visible some link level parameters to lease dumping
 * inet6: Don't regen temp addresses we didn't add
 * privsep: Don't limit file writes if logging to a file
 * DHCP6: Fix lease timings with nodelay option
2020-07-02 13:57:40 +00:00
roy b49ede492e dhcpcd: Build privsep resource limited sandbox. 2020-06-15 17:02:58 +00:00
roy a47a5665d4 Sync 2020-06-15 16:59:05 +00:00
roy e66fc20f54 Update to dhcpcd-9.1.2 with the following changes:
* NetBSD: free ARP state once IPv4LL address announced
* NetBSD: Mark RA dervied addresses as AUTOCONF
* BSD: Only mark static routes from dhcpcd.conf as static
* DHCP6: Ensure requested addresses are requested
* DHCP6: Fix prefix length calculation when no prefix specified
* privsep: Implement a resource limited sandbox
2020-06-15 16:58:01 +00:00
roy 378e0318d0 dhcpcd: Disable priviledge separation and sandboxing for SMALLPROG builds
It's a fair chunk of code and is probably safe enough for our ramdisks.
2020-06-11 16:05:54 +00:00
roy 50e9876ff7 dhcpcd: kqueue(2) support removed in favour of pollts(2) 2020-06-04 13:09:45 +00:00
roy b652e16f07 Sync 2020-06-04 13:08:13 +00:00
roy d37f9bca9d Update to dhcpcd-9.1.1 with the following changes:
* Restore dumping leases from stdin
 * auth: Only accept RECONFIGURE messages from LL addresses
 * auth: Access the RDM monotonic counter file via privsep
 * ARP: call arp_announced() when cancelling it
 * BSD: fwip(4) interfaces are now ignored by default
 * privsep: Ensure IPC buffers are large enough to carry messages
 * privsep: Only open RAW sockets for the needed protocols
 * privsep: Fix indirect ioctls returning data
 * privsep: wait for processes on SIGCHLD rather than when sent a STOP cmd
 * eloop: just use ppoll/pollts(2), falling back to pselect(2)
2020-06-04 13:07:12 +00:00
roy d31eb9bba7 Sync 2020-05-31 12:52:11 +00:00
roy 7c187152f8 Update to dhcpcd-9.1.0 with the following changes:
* Leases are stored outside the chroot again
 * The chroot directory can now be (and should be) empty [1]
 * ARP is now per address rather than per interface
 * Filter allowed ioctls in the privileged actioneer
 * Filter allowed UDP ports used by sendto(2) in the privileged actioneer
 * Filter allowed file paths in the privileged actioneer
 * route socket is now drained on overflow as it cannot be
   re-opened by the unpriviledged user

 * hostname can no longer be clobbered by SLAAC
 * grep is no longer used by the test hook
 * Interface hardware address type changes are now picked up
 * Fixed some RA timing issues
 * Fixed nd_* option parsing in dhcpcd.conf
 * Allow SIGPIPE in scripts
 * Default dhcpcd.conf no longer sends the current hostname
 * Default dhcpcd.conf no longer sends a vendorclassid
2020-05-31 12:50:46 +00:00
christos baffecd911 Add SIGPIPE to the list of dhcpcd affected signals since we sigignore it. 2020-05-10 17:58:16 +00:00
fox 3c582c5bdb external/bsd/dhcpcd: Suppress -Werror=sign-conversion error.
Add -Wno-error=sign-conversion to prevent build failure, when run with MKLIBCSANITIZER=yes.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-05-02 19:35:03 +00:00
roy 5e47f81657 Sync 2020-04-21 09:55:33 +00:00
roy 4f06a81613 Update to dhcpcd-9.0.2 with the following changes:
* Control sockets are not opened in test mode
 * privsep: no longer aborts if protocol not available
 * inet6: Don't regen temporary addresses without a state
 * inet6: Reduce RA log spam
 * dhcp6: Don't log when things consitently fail
 * inet6: Add temporary directive to slaac option [1]
 * Ensure current interface flags persist when setting a flag
 * DHCP via BPF is now aligned correctly
 * CMSG buffers are now aligned correctly
 * hostnames are no longer clobbered when being forced and a RA is recieved

[1] dhcpcd no longer looks at any possible kernel settings when deciding to
manage IPv6 temporary addresses or not. You now instruct dhcpcd to do this
in dhcpcd.conf. Playing whack-a-mole with various kernel knobs wasn't fun
and some OS's have or are removing RA and thus temporary address managemnt
from the kernel so said knobs are no longer there.
2020-04-21 09:54:16 +00:00
roy b6ae27bc57 privsep: Redirect to /dev/null unless test or quiet and not debug
Keeps the rtsol like behaviour the same.

Fixes PR bin/55170
2020-04-15 15:55:24 +00:00
roy 09220fdb89 dhcpcd: Don't open a control socket in test mode
Fixes PR bin/55170
2020-04-15 15:54:18 +00:00
kre e9f637c8af Since dhcpcd-hools/02-dump seems to have been removed from the
repository, don't attempt to install it, and don't expect it to
be installed.    If a better fix is to return 02-dump, then this
change can be reverted (by anyone, just go ahead and do it).

dhcpcd(8) should also have mention of 02-dump removed, if removing
it was intentional.
2020-04-14 03:16:26 +00:00
roy b6fb16d89c Sync 2020-04-13 15:46:26 +00:00
roy b4e670c413 Update to dhcpcd-9.0.1 with the following changes:
* privsep: Improve error when we don't have permission to write lease
  PR bin/55135
* privsep: Fix hooks restarting other daemons
2020-04-13 15:42:20 +00:00
christos e35433dceb Don't block signals when running hooks. Here ctx->sigset == defsigs ==
0x60006003, which blocks SIGTERM by default, so running something simple
from a hook, like /etc/rc.d/racoon restart does not work. The script
is then stuck waiting for the daemon to die, which it won't since it will
never receive the signal, and the hook never terminates.
2020-04-05 15:41:45 +00:00
roy 8f038d6ce5 Try a better syntax for building 30-hostname 2020-04-03 15:02:11 +00:00
roy 3a7c0202f1 Fix the build by building 30-hostname 2020-04-02 14:05:28 +00:00
roy cdef9ff213 Build dhcpcd with privsep support. 2020-04-02 12:56:01 +00:00
roy 4982964f6e Sync 2020-04-02 12:41:47 +00:00
roy 9a245d3e64 Update to dhcpcd-9.0.0 with the following changes:
* Decode interface complex interface names eth0.100:2 eth0i100:2.
   This allows us to ignore some virtual interfaces by default
 * ARP: Report L2 header address on conflict for more clarity
 * DHCP: Support jumbo frames (untested)
 * DHCP6: Clean up old lease on failure to confirm/rebind, etc
 * RA: Prefer older routers
 * INET6: Obscure prefixes are now calculated correctly

 * Privilege Separation
 * default hostname is now a blank string rather than localhost
 * Leases are now dumped over the control socket - you get RA's now as well.
 * Better support for many IPv6 routers
 * RTM_MISS filtering
 * RA: Deprecate stale addresses by setting pltime 0
 * DHCP6: Deprecate stale addresses by setting pltime 0
2020-04-02 12:38:54 +00:00
fox 8d2b6606df external/bsd/dhcpcd: Fix a -Wconversion warning.
Type cast uint16_t to size_t to prevent implicit type conversion.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
gcc version 8.3.0

Reviewed by: roy@, kamil@
2020-02-08 12:17:16 +00:00
christos 2c331b9b96 Hack for clang/powerpc 2020-01-29 23:42:57 +00:00
roy 9e07ed0a1b Sync 2020-01-27 20:42:56 +00:00
roy 893a5f978a Update to dhcpcd-8.1.6 with the following changes:
* INET6: Support a /128 prefix advertised via RA
 * BSD: More address validation from route(4) messages
 * DHCP: Fix a potential segfault on DaD failure
 * IPv4LL: Fix a potential segfault when dropping IPv4LL addresses
2020-01-27 20:41:58 +00:00
christos 44e2287fc9 prevent coredump when state == NULL 2020-01-26 22:57:52 +00:00