]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
7 years agoip6: use vlanid if present in working out stable private addresses
Roy Marples [Sat, 23 Jun 2018 20:06:40 +0000 (21:06 +0100)] 
ip6: use vlanid if present in working out stable private addresses

dhcpcd doesn't allow address sharing currently, so this is a
needed change for vlan users.

7 years agoRelease dhcpcd-7.0.6 v7.0.6
Roy Marples [Thu, 21 Jun 2018 11:35:46 +0000 (12:35 +0100)] 
Release dhcpcd-7.0.6

7 years agoFix my dumb mistake with the compile fixes which caused dhcpcd to
Roy Marples [Fri, 15 Jun 2018 08:10:55 +0000 (09:10 +0100)] 
Fix my dumb mistake with the compile fixes which caused dhcpcd to
ignore carrier loss on IPv4 addresses.

7 years agoduid: Implement RFC 6355
Roy Marples [Tue, 5 Jun 2018 10:36:33 +0000 (11:36 +0100)] 
duid: Implement RFC 6355

If no duid file is present and a system UUID exists, use that for
a DUID-UUID, otherwise proceed as before.

7 years agodhcp: Fix more fallout for builds without IPv4LL v7.0.5b
Roy Marples [Mon, 4 Jun 2018 16:30:16 +0000 (17:30 +0100)] 
dhcp: Fix more fallout for builds without IPv4LL

7 years agobuild: Allow a suffix to be specified on the dist tarball. v7.0.5a
Roy Marples [Mon, 4 Jun 2018 09:25:59 +0000 (10:25 +0100)] 
build: Allow a suffix to be specified on the dist tarball.

7 years agoFix compile without INET6
Roy Marples [Sun, 3 Jun 2018 11:19:15 +0000 (12:19 +0100)] 
Fix compile without INET6

7 years agoRelease dhcpcd-7.0.5 v7.0.5
Roy Marples [Sat, 2 Jun 2018 09:29:29 +0000 (10:29 +0100)] 
Release dhcpcd-7.0.5

7 years agoip6: if forked from ia callback, don't run ia handlers
Roy Marples [Sat, 2 Jun 2018 09:27:45 +0000 (10:27 +0100)] 
ip6: if forked from ia callback, don't run ia handlers

It's pointless and resolves an issue where the handler would try
and listen to an address when not in master mode, but it's already
listened to in the child.

7 years agodhcp6: Stop non delegated addresses being delegated
Roy Marples [Thu, 10 May 2018 17:51:56 +0000 (18:51 +0100)] 
dhcp6: Stop non delegated addresses being delegated

This was caused by allowing matching iaids and should now be resolved.

7 years agodhcp6: fix a memory issue with prior patch
Roy Marples [Tue, 8 May 2018 11:39:26 +0000 (12:39 +0100)] 
dhcp6: fix a memory issue with prior patch

Don't allocate memory for T1 or T2 timers when requesting
IA_TA addresses.

7 years agodhcp6: match IA type with request
Roy Marples [Tue, 8 May 2018 11:27:42 +0000 (12:27 +0100)] 
dhcp6: match IA type with request

So we don't send IA_NA, IA_TA and IA_PD addresses in the
IA_NA request if they all share the same IAID.

While here, fix a bug where IA_TA addresses would append
the DHCP6 unknown option 0 by mistakenly trying to put T1
and T2 timers in where there should be none.

7 years agodhcp6: IAID is now unique for IA type
Roy Marples [Mon, 7 May 2018 20:20:26 +0000 (21:20 +0100)] 
dhcp6: IAID is now unique for IA type

RFC3315 is a bit ambigious about this. At the start it says that
IAID is supposed to be unique across the client, but futher down
it starts to mention that the IAID number space is unqiuie to the
IA type.

RFC3315bis clarifies it's unique for the client and IA type, so
you can now have ia_na 1 and ia_pd 1.

7 years agodhcp: Clarify range checks in valid UDP packets
Roy Marples [Mon, 7 May 2018 14:01:46 +0000 (15:01 +0100)] 
dhcp: Clarify range checks in valid UDP packets

7 years agodhcp: checksum failure could be IP header too
Roy Marples [Sun, 6 May 2018 15:50:35 +0000 (16:50 +0100)] 
dhcp: checksum failure could be IP header too

7 years agobpf: add braces to clarify intent of sizeof
Roy Marples [Sun, 6 May 2018 15:28:33 +0000 (16:28 +0100)] 
bpf: add braces to clarify intent of sizeof

7 years agoarp: clarify that we check ar_hln in the BPF filter
Roy Marples [Sun, 6 May 2018 15:26:11 +0000 (16:26 +0100)] 
arp: clarify that we check ar_hln in the BPF filter

While here, re-arrange it a little to match the structure.

7 years agobpf: Clarify ip_hl check.
Roy Marples [Sun, 6 May 2018 09:11:44 +0000 (10:11 +0100)] 
bpf: Clarify ip_hl check.

7 years agobpf: BIOCIMMEDIATE argument is an unsigned int.
Roy Marples [Fri, 4 May 2018 14:17:45 +0000 (15:17 +0100)] 
bpf: BIOCIMMEDIATE argument is an unsigned int.

7 years agoDocument fqdn none.
Roy Marples [Thu, 3 May 2018 21:29:05 +0000 (22:29 +0100)] 
Document fqdn none.

7 years agoRelease dhcpcd-7.0.4 v7.0.4
Roy Marples [Wed, 2 May 2018 21:49:11 +0000 (22:49 +0100)] 
Release dhcpcd-7.0.4

7 years agodhcp6: Softwire Address and Port-Mapped Clients, RFC7598
Roy Marples [Wed, 2 May 2018 21:28:31 +0000 (22:28 +0100)] 
dhcp6: Softwire Address and Port-Mapped Clients, RFC7598

Add support for these options.
Untested, should work aside from the documented issue, patches welcome.

7 years agoipv6nd: use bools here
Roy Marples [Wed, 2 May 2018 21:03:25 +0000 (22:03 +0100)] 
ipv6nd: use bools here

7 years agoipv6nd: warn if router lifetime is set to zero
Roy Marples [Wed, 2 May 2018 21:01:18 +0000 (22:01 +0100)] 
ipv6nd: warn if router lifetime is set to zero

7 years agoDon't abort if recv returns an error.
Roy Marples [Tue, 1 May 2018 18:55:02 +0000 (19:55 +0100)] 
Don't abort if recv returns an error.

7 years agoauth: allow different tokens for send and receive
Roy Marples [Sun, 29 Apr 2018 20:38:58 +0000 (21:38 +0100)] 
auth: allow different tokens for send and receive

It was silly of me to assume that the same key would be used for
both sending and receiving. Because token protocol is not digested,
replace the digest argument with 0x123/0x456 where 0x123 is the
sending key and 0x456 is the receiving key.
Receiving key defaults to sending key, sending key defaults to zero.
This should allow existing configurations to work as is.

7 years agoauth: allow zero value replay detection data
Roy Marples [Sun, 29 Apr 2018 20:28:15 +0000 (21:28 +0100)] 
auth: allow zero value replay detection data

It seems one ISP doesn't use Replay Data and always sets it to zero.
See the comment in the commit as to why this is technically legal,
even if it goes against the intent of the RFC.

7 years agodhcpcd(8): document some servers might filter based on ClientID
Roy Marples [Sun, 29 Apr 2018 08:31:18 +0000 (09:31 +0100)] 
dhcpcd(8): document some servers might filter based on ClientID

Note that the DUID file might need to be edited as well.

7 years agoRFC 3315 21.4.4.1 says that SOLICT and DELAYED authentication
Roy Marples [Thu, 26 Apr 2018 18:35:43 +0000 (19:35 +0100)] 
RFC 3315 21.4.4.1 says that SOLICT and DELAYED authentication
should set RDM and replay data to zero.
draft-ietf-dhc-dhcpv6-clarify-auth-01 (expired) suggests that
INFORMATION REQ should be zero in this case as well.

As it's coming from a very similar angle, I agree.

7 years agologerr -> logerrx
Roy Marples [Thu, 19 Apr 2018 20:44:41 +0000 (21:44 +0100)] 
logerr -> logerrx

7 years agorouting: Fix case when cloning route changes but needs to be replaced.
Roy Marples [Thu, 19 Apr 2018 12:06:07 +0000 (13:06 +0100)] 
routing: Fix case when cloning route changes but needs to be replaced.

7 years agoDHCP6: Fix sending custom vendor class option.
Roy Marples [Thu, 19 Apr 2018 10:09:09 +0000 (11:09 +0100)] 
DHCP6: Fix sending custom vendor class option.

7 years agoCast away a conversion warning.
Roy Marples [Wed, 18 Apr 2018 19:33:50 +0000 (20:33 +0100)] 
Cast away a conversion warning.

7 years agoDHCPv6: Transpose DHCP userclass option into DHCPv6
Roy Marples [Tue, 17 Apr 2018 10:36:32 +0000 (11:36 +0100)] 
DHCPv6: Transpose DHCP userclass option into DHCPv6

7 years agoLinux: If listening to dev manager, let it remove interfaces
Roy Marples [Mon, 16 Apr 2018 09:23:30 +0000 (09:23 +0000)] 
Linux: If listening to dev manager, let it remove interfaces

Otherwise we race with the kernel removing and the dev manager
re-adding it.

7 years agoBSD: move the interface hint up the stack
Roy Marples [Mon, 16 Apr 2018 08:37:04 +0000 (09:37 +0100)] 
BSD: move the interface hint up the stack

This probably isn't needed, but allows us to hint the interface
when not directly setting IFP.

7 years agoLinux: Improve interface renaming
Roy Marples [Sun, 15 Apr 2018 13:36:36 +0000 (13:36 +0000)] 
Linux: Improve interface renaming

7 years agoOpenBSD: Fix adding INET6 on-link routes without an address
Roy Marples [Sun, 15 Apr 2018 13:23:49 +0000 (14:23 +0100)] 
OpenBSD: Fix adding INET6 on-link routes without an address

7 years agoOpenBSD: Remove more route labelling
Roy Marples [Sun, 15 Apr 2018 09:54:10 +0000 (10:54 +0100)] 
OpenBSD: Remove more route labelling

7 years agoRelease dhcpcd-7.0.3 v7.0.3
Roy Marples [Fri, 6 Apr 2018 10:28:57 +0000 (11:28 +0100)] 
Release dhcpcd-7.0.3

7 years agodhcp: mark routes needed dhcpcd adds to reach router as host routes
Roy Marples [Thu, 5 Apr 2018 13:22:39 +0000 (13:22 +0000)] 
dhcp: mark routes needed dhcpcd adds to reach router as host routes

This is mainly a cosmetic change.

7 years agoroutes: free optional routes at exit before the global free list.
Roy Marples [Wed, 28 Mar 2018 18:31:02 +0000 (18:31 +0000)] 
routes: free optional routes at exit before the global free list.

7 years agoroutes: allow a head clear with a context
Roy Marples [Wed, 28 Mar 2018 18:25:16 +0000 (18:25 +0000)] 
routes: allow a head clear with a context

This is because optionally defined routes may not have an interface
at the global level.
Also, init route lists earlier so they can be freed without error.

7 years agooptions: allow static routes to be configured on the command line
Roy Marples [Wed, 28 Mar 2018 10:00:18 +0000 (11:00 +0100)] 
options: allow static routes to be configured on the command line

7 years agodhcp6: fix a potential string termination error on status messages
Roy Marples [Tue, 27 Mar 2018 23:22:01 +0000 (00:22 +0100)] 
dhcp6: fix a potential string termination error on status messages

7 years agoBSD: fix segfault when on carrier when IPv6 addresses are present
Roy Marples [Tue, 27 Mar 2018 22:06:30 +0000 (23:06 +0100)] 
BSD: fix segfault when on carrier when IPv6 addresses are present

This doesn't affect NetBSD.

7 years agoudev: Use our logerr framework instead of syslog(3)
Roy Marples [Tue, 27 Mar 2018 07:52:25 +0000 (07:52 +0000)] 
udev: Use our logerr framework instead of syslog(3)

7 years agovanity: space out config.h a bit better
Roy Marples [Tue, 27 Mar 2018 06:23:31 +0000 (07:23 +0100)] 
vanity: space out config.h a bit better

7 years agoRelease dhcpcd-7.0.2 v7.0.2
Roy Marples [Tue, 27 Mar 2018 05:45:24 +0000 (06:45 +0100)] 
Release dhcpcd-7.0.2

7 years agoReally start dhcp on deletion of address.
Roy Marples [Thu, 22 Mar 2018 19:18:03 +0000 (19:18 +0000)] 
Really start dhcp on deletion of address.

7 years agoFor IPv4, override any existing address when adding it.
Roy Marples [Thu, 22 Mar 2018 18:22:04 +0000 (18:22 +0000)] 
For IPv4, override any existing address when adding it.
When deleting stale addresses, report our pid as the deletor.

7 years agoIf the DHCP leased address is deleted, enter the reboot phase.
Roy Marples [Thu, 22 Mar 2018 18:21:46 +0000 (18:21 +0000)] 
If the DHCP leased address is deleted, enter the reboot phase.

7 years agoThis should be an error.
Roy Marples [Thu, 22 Mar 2018 18:20:56 +0000 (18:20 +0000)] 
This should be an error.

7 years agoFree ARP state when the address is deleted.
Roy Marples [Thu, 22 Mar 2018 18:20:06 +0000 (18:20 +0000)] 
Free ARP state when the address is deleted.

7 years agoFix compile on OpenBSD.
Roy Marples [Mon, 19 Mar 2018 20:56:42 +0000 (20:56 +0000)] 
Fix compile on OpenBSD.

7 years agoTest for ENOMEM as well.
Roy Marples [Mon, 19 Mar 2018 17:26:15 +0000 (17:26 +0000)] 
Test for ENOMEM as well.

7 years agolink: detect buffer overflow / desync and relearn interface state
Roy Marples [Mon, 19 Mar 2018 15:39:05 +0000 (15:39 +0000)] 
link: detect buffer overflow / desync and relearn interface state

It's possible for the internal kernel buffer that reports network
events to overflow.
On Linux and NetBSD* this is handled by ENOBUFS being returned
by recv(2). On OpenBSD there is a special route(4) message RTM_DESYNC.
All other OS's don't seem to report this error, so dhcpcd cannot
detect it.

* I will commit a patch to NetBSD soon for this and will request a
pullup to NetBSD-8.

7 years agoipv6nd: simplify reachable
Roy Marples [Thu, 15 Mar 2018 20:31:14 +0000 (20:31 +0000)] 
ipv6nd: simplify reachable

7 years agodhcp6: deny unicast in non master mode
Roy Marples [Sat, 10 Mar 2018 11:50:08 +0000 (11:50 +0000)] 
dhcp6: deny unicast in non master mode

It seems that some DHCP6 servers or firewalls really insist on the
client sending from the correct source port.
This is the safest thing for the time being.

7 years agoLog the pid of the process deleting an assigned address.
Roy Marples [Tue, 6 Mar 2018 08:55:11 +0000 (08:55 +0000)] 
Log the pid of the process deleting an assigned address.

This should make debugging easier with third party software.

7 years agoipv6nd: drop DHCPv6 when RA fully expires
Roy Marples [Fri, 2 Mar 2018 15:00:07 +0000 (15:00 +0000)] 
ipv6nd: drop DHCPv6 when RA fully expires

Fixes an error where RA addresses would expire but the DHCPv6
lease still persisted.

7 years agodhcp6: don't drop when still asking for delegation
Roy Marples [Fri, 2 Mar 2018 13:58:52 +0000 (13:58 +0000)] 
dhcp6: don't drop when still asking for delegation

7 years agoinet6: remove references to the crazies.
Roy Marples [Sun, 25 Feb 2018 16:31:23 +0000 (16:31 +0000)] 
inet6: remove references to the crazies.

And add a comment that if we do this again to add a new knob for it.

7 years agoSpelling
Roy Marples [Tue, 20 Feb 2018 09:08:02 +0000 (09:08 +0000)] 
Spelling

7 years agohooks: document that hooks are not run within their own process
Roy Marples [Tue, 20 Feb 2018 09:06:38 +0000 (09:06 +0000)] 
hooks: document that hooks are not run within their own process

7 years agodhcpcd: Don't report errno when aborting here.
Roy Marples [Tue, 20 Feb 2018 08:36:53 +0000 (08:36 +0000)] 
dhcpcd: Don't report errno when aborting here.

7 years agoif-linux: if_setup_inet6 is called once so remove local ifname
Roy Marples [Tue, 20 Feb 2018 08:25:59 +0000 (08:25 +0000)] 
if-linux: if_setup_inet6 is called once so remove local ifname

7 years agodhcp: reset interval during init
Roy Marples [Tue, 13 Feb 2018 10:33:06 +0000 (10:33 +0000)] 
dhcp: reset interval during init

This fixes NetBSD where the lease is persisted at carrier down.
When the carrier comes back up again we need the interval
to reset to zero so that DHCP happens quicker.

7 years agoAdd support for setproctitle(3).
Roy Marples [Tue, 13 Feb 2018 10:22:31 +0000 (10:22 +0000)] 
Add support for setproctitle(3).

7 years agoWhitespace.
Roy Marples [Sat, 10 Feb 2018 20:52:31 +0000 (20:52 +0000)] 
Whitespace.

7 years agoFix compile on IllumOS.
Roy Marples [Fri, 2 Feb 2018 16:39:03 +0000 (16:39 +0000)] 
Fix compile on IllumOS.

7 years agoSatisfy FreeBSD and NetBSD.
Roy Marples [Fri, 2 Feb 2018 16:35:38 +0000 (16:35 +0000)] 
Satisfy FreeBSD and NetBSD.

7 years agoFix compile on FreeBSD.
Roy Marples [Fri, 2 Feb 2018 16:28:31 +0000 (16:28 +0000)] 
Fix compile on FreeBSD.

7 years agoinet6: simplify setup of kernel
Roy Marples [Fri, 2 Feb 2018 11:24:58 +0000 (11:24 +0000)] 
inet6: simplify setup of kernel

Rename if_checkipv6 to if_setup_inet6 so it's more descriptive.
simpify code as we don't really care about the result.
Restore the prior behavior of not disabling kernel RA handling
if dhcpcd is not doing it.

7 years agoRelease dhcpcd-7.0.1 v7.0.1
Roy Marples [Mon, 29 Jan 2018 10:53:05 +0000 (10:53 +0000)] 
Release dhcpcd-7.0.1

7 years agodhcpcd-run-hooks: set vars to blank
Roy Marples [Sat, 20 Jan 2018 20:37:48 +0000 (20:37 +0000)] 
dhcpcd-run-hooks: set vars to blank

7 years agodhcpcd-run-hooks: POSIX shell does not require the local builtin
Roy Marples [Sat, 20 Jan 2018 20:28:20 +0000 (20:28 +0000)] 
dhcpcd-run-hooks: POSIX shell does not require the local builtin

And sadly some ksh variants don't support it.
As dhcpcd strives to be portable, stop using local.

7 years agoRemove unused variable.
Roy Marples [Sat, 20 Jan 2018 17:16:25 +0000 (17:16 +0000)] 
Remove unused variable.

7 years agoRemove now unused sysloglike define.
Roy Marples [Tue, 16 Jan 2018 17:27:49 +0000 (17:27 +0000)] 
Remove now unused sysloglike define.

7 years agoMerge pull request #1 from chathhorn/patch-1
Roy Marples [Tue, 16 Jan 2018 17:17:47 +0000 (17:17 +0000)] 
Merge pull request #1 from chathhorn/patch-1

Fix build issue when `__GNUC__ <= 2`

7 years agoFix build issue when `__GNUC__ <= 2`
Chris Hathhorn [Tue, 16 Jan 2018 16:45:04 +0000 (10:45 -0600)] 
Fix build issue when `__GNUC__ <= 2`

The `__printflike` macro appears to take two arguments.

7 years agodhcpcd: don't log errors working out carrier for departed interfaces
Roy Marples [Thu, 11 Jan 2018 11:21:08 +0000 (11:21 +0000)] 
dhcpcd: don't log errors working out carrier for departed interfaces

7 years agoBump date for man updates.
Roy Marples [Mon, 8 Jan 2018 10:24:16 +0000 (10:24 +0000)] 
Bump date for man updates.

7 years agoRemove no longer needed active check from prior commit.
Roy Marples [Mon, 8 Jan 2018 09:29:51 +0000 (09:29 +0000)] 
Remove no longer needed active check from prior commit.

7 years agoipv4: allow configuration of static broadcast address
Roy Marples [Mon, 8 Jan 2018 09:25:31 +0000 (09:25 +0000)] 
ipv4: allow configuration of static broadcast address

7 years agoif: don't set MTU during interface discovery
Roy Marples [Sun, 7 Jan 2018 18:37:50 +0000 (18:37 +0000)] 
if: don't set MTU during interface discovery

7 years agodhcp: don't loop needlessly when handling an interface
Roy Marples [Sun, 7 Jan 2018 17:46:56 +0000 (17:46 +0000)] 
dhcp: don't loop needlessly when handling an interface

7 years agoif: don't activate non matching interfaces to commandline ones
Roy Marples [Sun, 7 Jan 2018 17:41:27 +0000 (17:41 +0000)] 
if: don't activate non matching interfaces to commandline ones

7 years agoconfigure: make --includedir=/usr/src/foo work
Roy Marples [Sun, 7 Jan 2018 13:24:21 +0000 (13:24 +0000)] 
configure: make --includedir=/usr/src/foo work

7 years agoeloop-bench: use calloc
Roy Marples [Fri, 5 Jan 2018 19:07:35 +0000 (19:07 +0000)] 
eloop-bench: use calloc

7 years agoeloop-bench: fix reading the last write
Roy Marples [Fri, 5 Jan 2018 17:29:27 +0000 (17:29 +0000)] 
eloop-bench: fix reading the last write

The last write was never read from the pipe in the run, so many
runs filled the kernel buffer causing an error which was not seen
because the pipe was blocking.

Set the pipes to non blocking and improve the exit conditions,
also ensuring the bench returns any error back.
While here add more timings and run critera.

Thanks to Christos Zoulas for helping.

7 years agodhcp: don't bind when we've just probed an address to inform
Roy Marples [Tue, 2 Jan 2018 16:36:04 +0000 (16:36 +0000)] 
dhcp: don't bind when we've just probed an address to inform

This fixes an early fork issue.

7 years agoRelease dhcpcd-7.0.0 v7.0.0
Roy Marples [Mon, 1 Jan 2018 11:17:56 +0000 (11:17 +0000)] 
Release dhcpcd-7.0.0

7 years agoWelcome to 2018.
Roy Marples [Mon, 1 Jan 2018 11:17:24 +0000 (11:17 +0000)] 
Welcome to 2018.

7 years agohooks: set protocol to link for link layer events
Roy Marples [Tue, 12 Dec 2017 14:32:48 +0000 (14:32 +0000)] 
hooks: set protocol to link for link layer events

7 years agoipv6: disable kernel RA if interface is active
Roy Marples [Tue, 12 Dec 2017 13:38:43 +0000 (13:38 +0000)] 
ipv6: disable kernel RA if interface is active

7 years agolinux: use IFA_F_NOPREFIXROUTE for ipv4 addresses
Roy Marples [Sun, 10 Dec 2017 18:49:20 +0000 (18:49 +0000)] 
linux: use IFA_F_NOPREFIXROUTE for ipv4 addresses

7 years agodhcp6: fix prefix delegations from spamming syslog
Roy Marples [Fri, 8 Dec 2017 10:29:49 +0000 (10:29 +0000)] 
dhcp6: fix prefix delegations from spamming syslog

This test was broken because pdp.vltime was already converted from
network order to host order.

7 years agobsd: set sa_len
Roy Marples [Thu, 7 Dec 2017 21:12:43 +0000 (21:12 +0000)] 
bsd: set sa_len

7 years agodhcp: set probe state only when probing.
Roy Marples [Thu, 7 Dec 2017 20:44:13 +0000 (20:44 +0000)] 
dhcp: set probe state only when probing.

This fixes the REBIND reason.