]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
9 years agoWorkaround a SunOS bug with reading more than 2^31 bytes of data.
Roy Marples [Wed, 8 Mar 2017 10:48:38 +0000 (10:48 +0000)] 
Workaround a SunOS bug with reading more than 2^31 bytes of data.

9 years agoInclude paths.h for _PATH_BPF
Roy Marples [Wed, 8 Mar 2017 09:00:51 +0000 (09:00 +0000)] 
Include paths.h for _PATH_BPF

9 years agoRename if_*raw functions to bpf_* so it's more descriptive and move
Roy Marples [Wed, 8 Mar 2017 08:41:07 +0000 (08:41 +0000)] 
Rename if_*raw functions to bpf_* so it's more descriptive and move
them from if-bsd.c to bpf.c so they can be re-used on SunOS in the future.
Linux is a special snowflake, so the BPF functions for opening, reading and
attaching remain in if-linux.c.
On Linux, open PF_PACKET as SOCK_RAW so we see the datalink frame header
just as BPF elsewhere so we don't have to mess around with offsets.

The BPF filters themselves have been improved to filter out more gunk such
as ensuring BOOTP messages are in an IPv4 packet and from the BOOTPS port.
ARP messages now check protocol family as well.

More improvements to T101.

9 years agoMore welcomes to 2017.
Roy Marples [Mon, 6 Mar 2017 10:18:10 +0000 (10:18 +0000)] 
More welcomes to 2017.

9 years agoBelated welcome to 2017.
Roy Marples [Mon, 6 Mar 2017 10:06:01 +0000 (10:06 +0000)] 
Belated welcome to 2017.

9 years agobpf: match ip_dst to to lease address when bound
Roy Marples [Sun, 5 Mar 2017 21:33:45 +0000 (21:33 +0000)] 
bpf: match ip_dst to to lease address when bound

Because we can't filter on xid as the only message we expect
is FORCERENEW.
Fixes T101.

9 years agobpf: ARP and BOOTP filter improvements
Roy Marples [Sun, 5 Mar 2017 21:05:24 +0000 (21:05 +0000)] 
bpf: ARP and BOOTP filter improvements

The ARP filter now checks hardware and protocol length matches
the interface, it's not from the interface itself and either the
source ip or target ip is one of our addresses of interest.

The BOOTP filter now checks for BOOTREPLY and matching xid.
If the interface hardware address fits inside chaddr then
that is checked as well.

9 years ago30-hostname: set to localhost when hostname is reqlinquished
Paul Walrath [Mon, 27 Feb 2017 22:41:46 +0000 (22:41 +0000)] 
30-hostname: set to localhost when hostname is reqlinquished

Summary:
If the DHCP controlled hostname is relinquished,
set it to a default value of localhost.
This allows a future lease to set it again.

Fixes T106.

Reviewers: pwalrath, test

Reviewed By: pwalrath

Maniphest Tasks: T106

Differential Revision: https://dev.marples.name/D101

9 years agoIf a new hostname is set, log it.
Roy Marples [Mon, 27 Feb 2017 22:06:11 +0000 (22:06 +0000)] 
If a new hostname is set, log it.

9 years agoRe-work the BPF filters so they are early return.
Roy Marples [Sun, 26 Feb 2017 20:33:33 +0000 (20:33 +0000)] 
Re-work the BPF filters so they are early return.
This will allow us to insert addresses of interest in the future.

9 years agoIgnore dhcpcd-hooks/50-ypbind
Roy Marples [Sun, 26 Feb 2017 10:29:30 +0000 (10:29 +0000)] 
Ignore dhcpcd-hooks/50-ypbind

9 years agoMark the message property of the DHCPv6 Status code as optional.
Roy Marples [Sun, 26 Feb 2017 10:25:41 +0000 (10:25 +0000)] 
Mark the message property of the DHCPv6 Status code as optional.
Fixes T104.

9 years agoFix a sign warning.
Roy Marples [Sun, 26 Feb 2017 00:23:31 +0000 (00:23 +0000)] 
Fix a sign warning.

9 years agoAdd a define to allow noisy ARP debugging.
Roy Marples [Sat, 25 Feb 2017 00:54:16 +0000 (00:54 +0000)] 
Add a define to allow noisy ARP debugging.

9 years agoIgnore ARP Unicast Poll, RFC 1122
Roy Marples [Sat, 25 Feb 2017 00:51:55 +0000 (00:51 +0000)] 
Ignore ARP Unicast Poll, RFC 1122

9 years agoAdd .gitignore so that generated files are excluded from git.
Roy Marples [Thu, 23 Feb 2017 01:03:57 +0000 (01:03 +0000)] 
Add .gitignore so that generated files are excluded from git.

9 years agoDetect .git directory and add debugging flags.
Roy Marples [Thu, 23 Feb 2017 01:03:08 +0000 (01:03 +0000)] 
Detect .git directory and add debugging flags.

9 years agoCopy out the inet6 address from some unaligned strucutures before using
Roy Marples [Tue, 14 Feb 2017 22:13:17 +0000 (22:13 +0000)] 
Copy out the inet6 address from some unaligned strucutures before using
the data to avoid unaligned access.

9 years agoBump dates for prior.
Roy Marples [Mon, 23 Jan 2017 17:34:13 +0000 (17:34 +0000)] 
Bump dates for prior.

9 years agoSpelling fixes from abhinav@netbsd.org
Roy Marples [Mon, 23 Jan 2017 17:32:47 +0000 (17:32 +0000)] 
Spelling fixes from abhinav@netbsd.org

9 years agoInclude a defintion for getallifaddrs from libsocket_priv.h
Roy Marples [Tue, 17 Jan 2017 20:02:31 +0000 (20:02 +0000)] 
Include a defintion for getallifaddrs from libsocket_priv.h
because that header is not available on all Illumos distros
but should be defined in all supported libc's.

9 years agoIt's more correct to say BSD has sa_len.
Roy Marples [Tue, 17 Jan 2017 12:21:12 +0000 (12:21 +0000)] 
It's more correct to say BSD has sa_len.

9 years agoNewer Illumos defines AF_PACKET which confuses us, so punt it.
Roy Marples [Tue, 17 Jan 2017 12:20:15 +0000 (12:20 +0000)] 
Newer Illumos defines AF_PACKET which confuses us, so punt it.

9 years agoFix runit service handling, [62772337e0].
Roy Marples [Sun, 15 Jan 2017 13:50:34 +0000 (13:50 +0000)] 
Fix runit service handling, [62772337e0].

9 years agoTest actual gateway given rather than one from a random variable.
Roy Marples [Sun, 15 Jan 2017 13:33:38 +0000 (13:33 +0000)] 
Test actual gateway given rather than one from a random variable.
Fixes [19f99593d5].

9 years agoOpenBSD-6.0 defines rt_mtu as a "convienience", so we need to #undef it.
Roy Marples [Fri, 13 Jan 2017 21:05:19 +0000 (21:05 +0000)] 
OpenBSD-6.0 defines rt_mtu as a "convienience", so we need to #undef it.

9 years agoRemove extra waitip from man page, fixed [b1c7268430].
Roy Marples [Mon, 19 Dec 2016 15:10:57 +0000 (15:10 +0000)] 
Remove extra waitip from man page, fixed [b1c7268430].

9 years agoDon't start arping if there is no configuration for it.
Roy Marples [Tue, 13 Dec 2016 20:39:30 +0000 (20:39 +0000)] 
Don't start arping if there is no configuration for it.

9 years agoTest we are given an interface in dhcpcd.conf before allocating a new interface
Roy Marples [Tue, 13 Dec 2016 20:13:27 +0000 (20:13 +0000)] 
Test we are given an interface in dhcpcd.conf before allocating a new interface
block.
Fixes [fb7e08848b].

While here, use reallocarray(3).
Also, fix strskipwhite to return a NULL if the start of the string to the end
is white space and adjust logic accordingly to reduce binary size.

9 years agoAdd support for MUD URL, draft-lear-ietf-netmod-mud-04.
Roy Marples [Fri, 9 Dec 2016 20:28:07 +0000 (20:28 +0000)] 
Add support for MUD URL, draft-lear-ietf-netmod-mud-04.
Thanks to Eliot Lear for the patch.

9 years agoChange arping_index from 1 based to 0 based, defaulting not started to -1.
Roy Marples [Tue, 6 Dec 2016 19:28:05 +0000 (19:28 +0000)] 
Change arping_index from 1 based to 0 based, defaulting not started to -1.
Fixes pinging the last set address.

9 years agoDon't trust bootp->sname to be NULL terminated.
Roy Marples [Tue, 29 Nov 2016 21:20:59 +0000 (21:20 +0000)] 
Don't trust bootp->sname to be NULL terminated.

9 years agoCast away a warning.
Roy Marples [Tue, 29 Nov 2016 20:55:42 +0000 (20:55 +0000)] 
Cast away a warning.

9 years agoInit kernel routes before building our routes after adding an IPv4LL address.
Roy Marples [Tue, 29 Nov 2016 20:14:30 +0000 (20:14 +0000)] 
Init kernel routes before building our routes after adding an IPv4LL address.

9 years agoAlways warn if we cannot open the config file.
Roy Marples [Tue, 29 Nov 2016 19:48:04 +0000 (19:48 +0000)] 
Always warn if we cannot open the config file.

9 years agoContinue operation when failing to send packets.
Roy Marples [Tue, 29 Nov 2016 19:44:32 +0000 (19:44 +0000)] 
Continue operation when failing to send packets.
My iwn(4) interface on FreeBSD11 and 12 struggles to associate.
A side effect of this is running out of buffer until it does, but we need
dhcpcd to continue once association is made and the buffers have emptied.

9 years agoImprove if_addrflag handling.
Roy Marples [Tue, 29 Nov 2016 18:02:04 +0000 (18:02 +0000)] 
Improve if_addrflag handling.

9 years agoFreeBSD does not set an error when trying to get IPv6 address flags for a just depart...
Roy Marples [Tue, 29 Nov 2016 16:25:37 +0000 (16:25 +0000)] 
FreeBSD does not set an error when trying to get IPv6 address flags for a just departed interface.

9 years agoFix IPv6 DAD on OpenBSD.
Roy Marples [Wed, 23 Nov 2016 21:10:10 +0000 (21:10 +0000)] 
Fix IPv6 DAD on OpenBSD.

9 years agoBackout prior, added stuff by mistake.
Roy Marples [Wed, 23 Nov 2016 21:08:30 +0000 (21:08 +0000)] 
Backout prior, added stuff by mistake.

9 years agoFix IPv6 DAD on OpenBSD.
Roy Marples [Wed, 23 Nov 2016 21:05:16 +0000 (21:05 +0000)] 
Fix IPv6 DAD on OpenBSD.

9 years agoOnly clear the address family routes we're re-loading.
Roy Marples [Wed, 23 Nov 2016 19:29:34 +0000 (19:29 +0000)] 
Only clear the address family routes we're re-loading.

9 years agoFix adding subnet routes without a source address on OpenBSD.
Roy Marples [Wed, 23 Nov 2016 19:15:41 +0000 (19:15 +0000)] 
Fix adding subnet routes without a source address on OpenBSD.

9 years agoMove ipv6_ctx into dhcpcd_ctx.
Roy Marples [Sat, 19 Nov 2016 16:15:45 +0000 (16:15 +0000)] 
Move ipv6_ctx into dhcpcd_ctx.

9 years agoOnly build the routing tables for the address family we are interested in.
Roy Marples [Sat, 19 Nov 2016 10:17:07 +0000 (10:17 +0000)] 
Only build the routing tables for the address family we are interested in.

9 years agoRevert prior, it's wrong.
Roy Marples [Fri, 18 Nov 2016 18:00:43 +0000 (18:00 +0000)] 
Revert prior, it's wrong.

9 years agoStop spamming each route change needlessly.
Roy Marples [Fri, 18 Nov 2016 17:40:21 +0000 (17:40 +0000)] 
Stop spamming each route change needlessly.

9 years agoOnly compare the address part length as the rest maybe garbage.
Roy Marples [Fri, 18 Nov 2016 16:41:01 +0000 (16:41 +0000)] 
Only compare the address part length as the rest maybe garbage.

9 years agoImprove NTP timestamp from realtime and fix the double host to network translation...
Roy Marples [Fri, 18 Nov 2016 15:27:20 +0000 (15:27 +0000)] 
Improve NTP timestamp from realtime and fix the double host to network translation on it.

9 years agoMerge fixes from dhcpcd-6 for authentication token algo.
Roy Marples [Fri, 18 Nov 2016 13:51:50 +0000 (13:51 +0000)] 
Merge fixes from dhcpcd-6 for authentication token algo.

9 years agoAuthentication token support should have an algo of 0.
Roy Marples [Fri, 18 Nov 2016 13:49:22 +0000 (13:49 +0000)] 
Authentication token support should have an algo of 0.

9 years agoFix markup.
Roy Marples [Fri, 18 Nov 2016 13:48:12 +0000 (13:48 +0000)] 
Fix markup.

9 years agoDon't assume we always have RTA_IFA.
Roy Marples [Thu, 17 Nov 2016 12:26:30 +0000 (12:26 +0000)] 
Don't assume we always have RTA_IFA.

9 years agoImprove nl80211 support as we now know how to work out the SSID we're
Roy Marples [Thu, 17 Nov 2016 12:10:18 +0000 (12:10 +0000)] 
Improve nl80211 support as we now know how to work out the SSID we're
connected to.

9 years agoImprove nl80211 support as we now know how to work out the SSID we're
Roy Marples [Thu, 17 Nov 2016 11:52:11 +0000 (11:52 +0000)] 
Improve nl80211 support as we now know how to work out the SSID we're
connected to.

9 years agoFix compile on FreeBSD.
Roy Marples [Wed, 16 Nov 2016 13:43:08 +0000 (13:43 +0000)] 
Fix compile on FreeBSD.

9 years agoFix sa_fromprefix for real on BSD.
Roy Marples [Thu, 10 Nov 2016 18:35:21 +0000 (18:35 +0000)] 
Fix sa_fromprefix for real on BSD.

9 years agoSet sa_len when creating a sockaddr from a prefix.
Roy Marples [Thu, 10 Nov 2016 18:26:32 +0000 (18:26 +0000)] 
Set sa_len when creating a sockaddr from a prefix.

9 years agoFix size of DHCPv6 addresses when making messages.
Roy Marples [Thu, 10 Nov 2016 13:47:46 +0000 (13:47 +0000)] 
Fix size of DHCPv6 addresses when making messages.

9 years agoDo somewith with getline result in configure to make it pass.
Roy Marples [Tue, 8 Nov 2016 23:05:05 +0000 (23:05 +0000)] 
Do somewith with getline result in configure to make it pass.

9 years agoDo somewith with getline result in configure to make it pass.
Roy Marples [Tue, 8 Nov 2016 23:03:28 +0000 (23:03 +0000)] 
Do somewith with getline result in configure to make it pass.

9 years agoReject routes on Linux don't use a gateway.
Roy Marples [Tue, 8 Nov 2016 22:43:13 +0000 (22:43 +0000)] 
Reject routes on Linux don't use a gateway.

9 years agoFix working with REJECT routes.
Roy Marples [Tue, 8 Nov 2016 22:42:34 +0000 (22:42 +0000)] 
Fix working with REJECT routes.

9 years agoMove union sa_ss to sa.h
Roy Marples [Tue, 8 Nov 2016 22:41:34 +0000 (22:41 +0000)] 
Move union sa_ss to sa.h
Fix sa_fromprefix so that zero'd netmask bytes do not overwrite the last bit
set.
If assert is being used, add tests that sa_fromprefix and sa_toprefix generate
correct results by agreeing with each other.

9 years agoIf netmask is INADDR_ANY then CIDR must be 0.
Roy Marples [Tue, 8 Nov 2016 21:09:31 +0000 (21:09 +0000)] 
If netmask is INADDR_ANY then CIDR must be 0.

9 years agoFix rt_find on linux
Roy Marples [Tue, 8 Nov 2016 20:57:26 +0000 (20:57 +0000)] 
Fix rt_find on linux

9 years agoRemove debug
Roy Marples [Tue, 8 Nov 2016 20:57:16 +0000 (20:57 +0000)] 
Remove debug

9 years agoDefault DBDIR from /var/db to /var/db/dhcpcd.
Roy Marples [Tue, 8 Nov 2016 12:17:20 +0000 (12:17 +0000)] 
Default DBDIR from /var/db to /var/db/dhcpcd.
Move dhcpcd.duid and dhcpcd.secret from /etc into /var/db/dhcpcd.
Move leases and RDM monotonc from /var/db into /var/db/dhcpcd.
All moves files have the dhcpcd{.-} prefix dropped.

9 years agoRemove distinfo files before making them.
Roy Marples [Sat, 5 Nov 2016 11:35:39 +0000 (11:35 +0000)] 
Remove distinfo files before making them.

9 years agoRemove distinfo files before making them.
Roy Marples [Sat, 5 Nov 2016 11:35:13 +0000 (11:35 +0000)] 
Remove distinfo files before making them.

9 years agoKeep the distinfo in the signed result.
Roy Marples [Sat, 5 Nov 2016 11:18:35 +0000 (11:18 +0000)] 
Keep the distinfo in the signed result.

9 years agoKeep the distinfo in the signed result.
Roy Marples [Sat, 5 Nov 2016 11:17:45 +0000 (11:17 +0000)] 
Keep the distinfo in the signed result.

9 years agomake distinfo now produces a .distinfo file which contains checksum(s) of
Roy Marples [Fri, 4 Nov 2016 15:37:43 +0000 (15:37 +0000)] 
make distinfo now produces a .distinfo file which contains checksum(s) of
the dist file. This distinfo file is then signed with a PGP key.

9 years agoFix clean files
Roy Marples [Fri, 4 Nov 2016 15:34:42 +0000 (15:34 +0000)] 
Fix clean files

9 years agomake distinfo now produces a .distinfo file which contains checksum(s) of
Roy Marples [Fri, 4 Nov 2016 15:31:14 +0000 (15:31 +0000)] 
make distinfo now produces a .distinfo file which contains checksum(s) of
the dist file. This distinfo file is then signed with a PGP key.

9 years agoRemove address family specific routing and introduce address family
Roy Marples [Tue, 25 Oct 2016 15:33:02 +0000 (15:33 +0000)] 
Remove address family specific routing and introduce address family
agnostic routing.
This makes the platform drivers simpler and reduces some code duplication.
Needs a lot of testing.

9 years agologger output always goes to stderr now.
Roy Marples [Mon, 24 Oct 2016 19:24:38 +0000 (19:24 +0000)] 
logger output always goes to stderr now.

9 years agohwaddr_ntoa now takes a void * as a source.
Roy Marples [Mon, 24 Oct 2016 19:21:23 +0000 (19:21 +0000)] 
hwaddr_ntoa now takes a void * as a source.

9 years agoRemove debug.
Roy Marples [Mon, 24 Oct 2016 19:18:43 +0000 (19:18 +0000)] 
Remove debug.

9 years agoReturn an error.
Roy Marples [Fri, 14 Oct 2016 09:19:42 +0000 (09:19 +0000)] 
Return an error.

9 years agoAlways create the ARP state when binding .... when adding the address only search...
Roy Marples [Fri, 14 Oct 2016 09:19:29 +0000 (09:19 +0000)] 
Always create the ARP state when binding .... when adding the address only search for it. This means we always have the correct callbacks.

9 years agoMerge BSD IPv6 kernel checking from trunk.
Roy Marples [Fri, 14 Oct 2016 09:13:38 +0000 (09:13 +0000)] 
Merge BSD IPv6 kernel checking from trunk.

9 years agoRe-work checking IPv6 kernel settings on BSD.
Roy Marples [Fri, 14 Oct 2016 09:07:42 +0000 (09:07 +0000)] 
Re-work checking IPv6 kernel settings on BSD.

9 years agoSupport kernels which implement RFC5227.
Roy Marples [Fri, 14 Oct 2016 08:55:04 +0000 (08:55 +0000)] 
Support kernels which implement RFC5227.
This means we don't have to open an ARP socket unless we need to ARPing.
Allow ARP an ARPing to be optional features.

9 years agoMerge dhcpcd-6 changes.
Roy Marples [Mon, 10 Oct 2016 08:50:04 +0000 (08:50 +0000)] 
Merge dhcpcd-6 changes.

9 years agoI updated this file this year.
Roy Marples [Mon, 10 Oct 2016 08:47:56 +0000 (08:47 +0000)] 
I updated this file this year.

9 years agoIf there is no announced_cb, free the arp state.
Roy Marples [Mon, 10 Oct 2016 08:47:13 +0000 (08:47 +0000)] 
If there is no announced_cb, free the arp state.

9 years agoReturn early to make code more readable.
Roy Marples [Mon, 10 Oct 2016 08:46:41 +0000 (08:46 +0000)] 
Return early to make code more readable.

9 years agoFix build with DEBUG_NS
Roy Marples [Mon, 10 Oct 2016 08:04:34 +0000 (08:04 +0000)] 
Fix build with DEBUG_NS

9 years agoCopy pdp.prefix as it's not aligned.
Roy Marples [Sun, 9 Oct 2016 08:16:42 +0000 (08:16 +0000)] 
Copy pdp.prefix as it's not aligned.

9 years agoRelease dhcpcd-6.11.5 v6.11.5
Roy Marples [Sun, 9 Oct 2016 08:07:17 +0000 (08:07 +0000)] 
Release dhcpcd-6.11.5

9 years agoCorrect define to __OpenBSD__. Fixes [ad8b5130d4] again.
Roy Marples [Sun, 9 Oct 2016 08:06:10 +0000 (08:06 +0000)] 
Correct define to __OpenBSD__. Fixes [ad8b5130d4] again.

9 years agoCorrect define to __OpenBSD__.
Roy Marples [Sun, 9 Oct 2016 08:02:37 +0000 (08:02 +0000)] 
Correct define to __OpenBSD__.
Fixes [ad8b5130d4] again.

9 years agoMerge fixes from branch
Roy Marples [Fri, 7 Oct 2016 10:01:09 +0000 (10:01 +0000)] 
Merge fixes from branch

9 years agoMerge fixes from branch
Roy Marples [Fri, 7 Oct 2016 10:01:09 +0000 (10:01 +0000)] 
Merge fixes from branch

9 years agoFix build system to make import correctly for authentication.
Roy Marples [Fri, 7 Oct 2016 09:42:38 +0000 (09:42 +0000)] 
Fix build system to make import correctly for authentication.

9 years agoFix import for auth
Roy Marples [Fri, 7 Oct 2016 08:34:00 +0000 (08:34 +0000)] 
Fix import for auth

9 years agoRelease dhcpcd-6.11.4 v6.11.4
Roy Marples [Fri, 7 Oct 2016 08:05:10 +0000 (08:05 +0000)] 
Release dhcpcd-6.11.4

9 years agoCast away some more compile errors.
Roy Marples [Thu, 6 Oct 2016 10:36:47 +0000 (10:36 +0000)] 
Cast away some more compile errors.

9 years agoRemove debug.
Roy Marples [Wed, 5 Oct 2016 19:20:39 +0000 (19:20 +0000)] 
Remove debug.