Commit Graph

5666 Commits

Author SHA1 Message Date
Roy Marples
d2fbde99cf Release dhcpcd-10.0.2 2023-07-19 14:34:04 +01:00
Roy Marples
4523393a82 Fix compile warning with rb.c sync 2023-07-19 13:46:08 +01:00
Tobias Heider
ca67bd26f5
compat sync (#226)
* compat: sync pidfile.c with netbsd v1.16

- fix typos in word "otherwise".
- s/sucess/success/ in comment.

* compat: sync rb.c with netbsd v1.16

- fix typos in word "successfully", mainly s/succesfully/successfully/.
- toolify

* compat: sync strlcpy.c with openbsd v1.16

- I am retiring my old email address;  replace it with my OpenBSD one.

* compat: sync arc4random_uniform.c with openbsd v1.3
2023-07-19 13:29:48 +01:00
Roy Marples
4f5c4999b6 linux: consider IFF_LOWER_UP and !IFF_DORMANT for LINK_UP 2023-07-19 13:23:09 +01:00
Roy Marples
13cce2c82e privsep: Send only what we have put in the buffer to script env
Rather then sending the whole buffer size.
If there is an error writing the last option, it may not be
NUL terminated correctly causing an assert.
Even so, we should not write the failed option to the environment
either as it would be a false positive for an empty option.
2023-07-19 12:42:49 +01:00
Roy Marples
b1c6074e43 common: Allow hwaddr_ntoa to print an empty string
This fixes #218 where we get a zero hardware address length in
an ARP packet or a length that overflows the string buffer.
2023-07-04 08:58:13 +01:00
Roy Marples
3d956701c4 common: Improve valid_domain and check correct return
Improvement for #218.
2023-07-03 12:52:19 +01:00
Roy Marples
327e19a5cc privsep: Only unlink control sockets if we created them
Fixes a segfault when trying to start dhcpcd as a non root user.
Closes #219 without an explicit test for being the root user.
2023-07-02 01:28:34 +01:00
Xea
f7035a2f3f
risc-v fix vendor error (#213)
* added mproc for risc-v

* make mproc arches alphabetically sorted again
2023-06-19 17:20:29 +01:00
Rob Gill
8c81ac3bef
Additional DHCP options (#214)
DDoS Open Threat Signaling (DOTS) Agent Discovery, RFC8973
DHCP option 147,147; DHCPv6 option 141,142

Captive Portal, RFC8910
DHCP option 114; DHCVv6 option 104

update to attribution for MUD URL - RFC8520

Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2023-06-19 17:19:21 +01:00
Roy Marples
f77c5f131b privsep: Check if we have a root process before sending it stuff
Fixes #210
2023-06-19 17:04:03 +01:00
Roy Marples
45e441ada6 Linux: Improve learning IPv6 address flags
Rather than matching addresses during netlink message processing,
extract the local, address and flag parts.
Once done, then match local and address to the address we are
looking for and if equal apply the flags.

Fixes #201 and maybe #149.
2023-05-23 22:14:57 +01:00
frazar
6a369c6d7b
chore: Link to GitHub for the commit log and release announcements (#203)
Fixes one of the two rotten links reported in #202
2023-05-18 22:09:53 +01:00
Roy Marples
dccebe204f Linux: fix disabling of kernel RA autoconf
Well, that was a big whups leaving it turned on.
Thanks to Klaus Frank for the spot.
Fixes #176.
2023-05-18 12:27:10 +01:00
Roy Marples
1d19d4963f chore: Fix generation of dependency file 2023-05-18 12:15:49 +01:00
Roy Marples
838770a130 build: Remove suffix prerequisite rules
Just to silence GNU make.
This makes development slightly harder on BSDs, just have to
do a `make clean` when changing configuration options.

Fixes #197.
2023-05-18 11:40:55 +01:00
Roy Marples
b6a207dc6d chore: Document building a bit more
And the fact that configure is not GNU.
2023-05-18 11:40:19 +01:00
Roy Marples
a33c227105 options: Allow waitip to take space separated address families
This is easier than writing confusing documentation to clarify.
Fixes #206.
2023-05-18 10:41:56 +01:00
Roy Marples
521afc2296 dhcpcd: Fix waitip address family
Minor fix for #206.
2023-05-17 17:52:33 +01:00
Roy Marples
4a1d2dcded dhcpcd: support HANGUP of stderr cb 2023-05-17 17:39:27 +01:00
Roy Marples
567bd8cbf6 control: Ingore control not connected errors too
For FreeBSD.
Another one for #205.
2023-05-17 10:52:23 +01:00
Roy Marples
536115a002 control: ignore EPIPE errors on write
Other end has shutdown.
2023-05-17 09:45:34 +00:00
Roy Marples
41084f3462 control: deal with hangup better
Maybe fix #205
2023-05-17 03:08:45 +01:00
Roy Marples
8b29c0ddf0 privsep: Allow zero length messages through
They should be handled gracefully without privsep anyway.
Fix for #179.
2023-05-16 17:18:07 +01:00
Roy Marples
b9ac3021af DHCP: Don't enforce the message came port 67
RFC2131 and updates make no mention of what the source port
should or must be.

Update for #179.
2023-05-08 15:54:31 +01:00
J. Hannken-Illjes
681866a728 BSD: Fix non INET6 builds 2023-04-27 12:43:33 +01:00
Roy Marples
008121afd0 OpenBSD: Ensure if_afreq is correct initialised. 2023-04-26 14:29:46 +01:00
Roy Marples
27c0b01164 BSD: When we get RTM_NEWADDR the interface must have IFF_UP.
This is apparently historic behaviour.
It's not always mirrored in RTM_IFINFO either so we need to
replicate the behaviour if we had got it earlier.

This fixes dhcpcd requiring at least something to set the interface
up before starting on OpenBSD.
Other BSD are less impacted because it's a lot harder to get into
this state as we have more control over setting the IPv6 LL address.
2023-04-26 14:15:07 +01:00
Roy Marples
ca51f8dfeb Revert "OpenBSD: When attaching INET6 set IFF_UP"
This reverts commit 985aa759da.
2023-04-26 14:01:07 +01:00
Roy Marples
985aa759da OpenBSD: When attaching INET6 set IFF_UP
Because some, if not all, OpenBSD interface drivers do this.
https://github.com/openbsd/src/blob/master/sys/dev/pv/if_vio.c#L856

With this hack, dhcpcd can now operate at boot time without any
manual interface setup.
2023-04-26 11:52:17 +01:00
Roy Marples
d3e526f524 OpenBSD: add RTM_DESYNC to route(4) filter. 2023-04-25 14:32:40 +01:00
Roy Marples
b80133b6b3 OpenBSD: fix unused variables compile warning 2023-04-25 11:06:29 +01:00
Roy Marples
4cb7c8dfc3 dhcp6: log debug inform requests when the prior action failed
This should reduce log spam without debug for badly configured networks.
Fixes #80.
2023-04-24 11:53:54 +01:00
Roy Marples
6cdc5195ec eloop: define __arraycount if not defined by the OS 2023-04-23 08:54:23 +01:00
Roy Marples
890169267c chore: stat isn't portable, wc is 2023-04-21 14:58:50 +01:00
Roy Marples
6bb2a69338 chore: include filesize in the distinfo 2023-04-21 11:08:32 +01:00
Roy Marples
6c2ea6c42f chore: Makefile parts are more copy and pastable 2023-04-20 21:14:02 +01:00
Roy Marples
5d9bf80c26 Release dhcpcd-10.0.1 2023-04-20 12:16:36 +01:00
Roy Marples
266231f59f chore: fix release 2023-04-20 12:15:57 +01:00
Roy Marples
0019d0b8c5 chore: update build system to publish signed github releases
We rely on the GitHub CLI tools to do this.
We publish the compressed source tarball and a detached PGP
signature for it.
We add the SHA256 checksum of the tarball as a note on the release.
Automatic links to the changes are also given.
2023-04-20 12:02:48 +01:00
Roy Marples
257259dd79 bpf: Always open /dev/bpf directly
Ignore _PATH_BPF as that's really a NetBSDism.
If /dev/bpf throws a wobbly then try /dev/bpfN for older kernels.

This allows cloning BPF on more BSD systems.
2023-04-13 17:43:11 +01:00
Roy Marples
7a97d103c5 Release dhcpcd-10.0.0 2023-04-13 11:59:45 +01:00
Roy Marples
af56d0d635 FreeBSD no longer needs static linking 2023-04-11 19:25:03 +01:00
Roy Marples
293f2af6ad dhcpcd doesn't need to be statically linked on DragonFly 2023-03-17 11:11:39 +00:00
Roy Marples
c1dc1ca98d Merge remote-tracking branch 'github/privsep-musl' 2023-03-16 12:04:29 +00:00
Roy Marples
4bc5fff168 Merge remote-tracking branch 'github/dhcp6-ntp' 2023-03-16 12:02:33 +00:00
Roy Marples
533ef88866 privsep: Allow ioctl TIOCGWINSZ for dumping leases on musl
Fixes #186.
2023-02-24 10:17:27 +00:00
Roy Marples
0d005d65e7 control: Improve error handling if reading a control message fails 2023-02-24 10:16:26 +00:00
Roy Marples
78502f134e Remove debug 2023-02-23 00:27:55 +00:00
Roy Marples
ac400150d4 privsep: Allow madvise for musl.
Fixes #186.
2023-02-23 00:21:14 +00:00