]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
6 years agodhcpcd.conf.5.in: Fix various typos, add more markup, etc.
David H. Gutteridge [Sat, 15 Sep 2018 23:49:00 +0000 (19:49 -0400)] 
dhcpcd.conf.5.in: Fix various typos, add more markup, etc.

Fix some minor spelling and grammar issues, add more markup in places to help contextualize terms, add a touch more detail to 'Defining new options', make acronym formatting more consistent, etc.

6 years agodhcpcd.8.in: More minor style tweaks
David H. Gutteridge [Sat, 15 Sep 2018 23:41:27 +0000 (19:41 -0400)] 
dhcpcd.8.in: More minor style tweaks

Use a consistent format for RFC references: a space between RFC and the ID number, as this is the most commonly-used format in man pages, and indeed in the RFCs themselves. Also, a few minor grammatical fixes.

6 years agoFix prior - always return if lease is invalid.
Roy Marples [Mon, 10 Sep 2018 13:57:49 +0000 (14:57 +0100)] 
Fix prior - always return if lease is invalid.

6 years agodhcp6: always move to the DISCOVER phase if the offered lease is invalid
Roy Marples [Mon, 10 Sep 2018 11:02:55 +0000 (12:02 +0100)] 
dhcp6: always move to the DISCOVER phase if the offered lease is invalid

6 years agodhcp6: only send dhcp6 to an interface if it has a send object.
Roy Marples [Fri, 7 Sep 2018 13:01:36 +0000 (14:01 +0100)] 
dhcp6: only send dhcp6 to an interface if it has a send object.

6 years agodhcp6: write RECONFIGURE6 here to match other places
Roy Marples [Fri, 7 Sep 2018 12:56:20 +0000 (13:56 +0100)] 
dhcp6: write RECONFIGURE6 here to match other places

6 years agodhcp6: don't log an error here.
Roy Marples [Fri, 7 Sep 2018 12:38:07 +0000 (13:38 +0100)] 
dhcp6: don't log an error here.

6 years agoMerge pull request #4 from dhgutteridge/master
Roy Marples [Tue, 4 Sep 2018 13:08:19 +0000 (14:08 +0100)] 
Merge pull request #4 from dhgutteridge/master

dhcpcd.8.in: Fix typos and minor grammatical issues

6 years agodhcpcd.8.in: Fix typos and minor grammatical issues
David H. Gutteridge [Mon, 3 Sep 2018 16:39:32 +0000 (12:39 -0400)] 
dhcpcd.8.in: Fix typos and minor grammatical issues

6 years agoMerge pull request #3 from sevan/usage
Roy Marples [Mon, 27 Aug 2018 17:20:25 +0000 (18:20 +0100)] 
Merge pull request #3 from sevan/usage

Update usage() to match documented flags

6 years agoUpdate usage() to match documented flags
Sevan Janiyan [Mon, 27 Aug 2018 13:37:18 +0000 (14:37 +0100)] 
Update usage() to match documented flags

6 years agoRelease dhcpcd-7.0.8 v7.0.8
Roy Marples [Mon, 20 Aug 2018 10:37:17 +0000 (11:37 +0100)] 
Release dhcpcd-7.0.8

6 years agoRemove redundant assignment
Roy Marples [Sun, 19 Aug 2018 20:07:09 +0000 (21:07 +0100)] 
Remove redundant assignment

6 years agoConsistency
Roy Marples [Sun, 19 Aug 2018 20:05:39 +0000 (21:05 +0100)] 
Consistency

6 years agoBSD: Silence debug when address no longer exists when getting flags
Roy Marples [Fri, 17 Aug 2018 16:38:28 +0000 (17:38 +0100)] 
BSD: Silence debug when address no longer exists when getting flags

6 years agoWorkaround NetBSD-7 sending an invalid bcast address in RTM_NEWADDR
Roy Marples [Fri, 17 Aug 2018 16:29:30 +0000 (17:29 +0100)] 
Workaround NetBSD-7 sending an invalid bcast address in RTM_NEWADDR

6 years agoNetBSD-7 has an incomplete IP_PKTINFO implementation.
Roy Marples [Fri, 17 Aug 2018 16:21:40 +0000 (17:21 +0100)] 
NetBSD-7 has an incomplete IP_PKTINFO implementation.

It only works for receiving data, not sending it.
We only need it to send, so pretend it doesn't exist.

6 years agoipv4: add broadcast address to RTM_NEWADDR debug
Roy Marples [Fri, 17 Aug 2018 16:18:56 +0000 (17:18 +0100)] 
ipv4: add broadcast address to RTM_NEWADDR debug

7 years agoFix a promotion caught with gcc -fsanitize=undefined.
Kamil Rytarowski [Wed, 25 Jul 2018 00:35:52 +0000 (01:35 +0100)] 
Fix a promotion caught with gcc -fsanitize=undefined.

7 years agoRelease dhcpcd-7.0.7 v7.0.7
Roy Marples [Tue, 24 Jul 2018 07:49:00 +0000 (08:49 +0100)] 
Release dhcpcd-7.0.7

7 years agoMake config.h more pretty
Roy Marples [Tue, 24 Jul 2018 07:44:17 +0000 (08:44 +0100)] 
Make config.h more pretty

7 years agoSome systems mark a host route using RTF_HOST and some use an
Roy Marples [Sun, 15 Jul 2018 13:20:16 +0000 (14:20 +0100)] 
Some systems mark a host route using RTF_HOST and some use an
all-ones netmask.

For the former, only test netmask for equality if both routes
lack the RTF_HOST marking.

7 years agolinux: set RTF_HOST correctly when reading kernel routes.
Roy Marples [Mon, 2 Jul 2018 21:36:44 +0000 (22:36 +0100)] 
linux: set RTF_HOST correctly when reading kernel routes.

Linux has no real concept of host routes, but dhcpcd does purely
for describing them.
As such, mark them has host routes if the netmask if all ones.

7 years agolinux: fix adding host routes
Roy Marples [Sun, 1 Jul 2018 19:46:03 +0000 (20:46 +0100)] 
linux: fix adding host routes

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