]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Tue, 28 Mar 2017 21:29:24 +0000 (22:29 +0100)]
Define htonll a macro as it's only used once.
Roy Marples [Tue, 28 Mar 2017 21:08:59 +0000 (22:08 +0100)]
Remove the gateway and nogateway options.
These can be controlled via the nooption directives instead.
Roy Marples [Mon, 27 Mar 2017 15:01:52 +0000 (16:01 +0100)]
Fix a potential crash where the DHCP state could be freed during processing.
Roy Marples [Mon, 27 Mar 2017 14:56:34 +0000 (15:56 +0100)]
Fix a potential crash where the ARP state could be freed during processing.
Roy Marples [Fri, 24 Mar 2017 21:57:25 +0000 (21:57 +0000)]
Fix compile on OpenBSD.
Roy Marples [Fri, 24 Mar 2017 21:36:56 +0000 (21:36 +0000)]
Fix compile on NetBSD.
Roy Marples [Fri, 24 Mar 2017 21:34:12 +0000 (21:34 +0000)]
Remove ipv6ra_own and ipv6ra_own_default options.
This is controllable via noipv6 and noipv6rs options.
Roy Marples [Fri, 24 Mar 2017 16:23:42 +0000 (16:23 +0000)]
Add LICENSE.
Roy Marples [Fri, 24 Mar 2017 13:31:29 +0000 (13:31 +0000)]
Remove documentation for --logfile.
Roy Marples [Fri, 24 Mar 2017 13:29:50 +0000 (13:29 +0000)]
Fix compile on Linux for dev support.
Roy Marples [Fri, 24 Mar 2017 12:47:16 +0000 (12:47 +0000)]
Add an .arcconfig file to hook arcanist with phabricator.
Roy Marples [Fri, 24 Mar 2017 09:13:02 +0000 (09:13 +0000)]
Remove custom logger and output all diagnostics via syslog(3).
Remove the --logfile option.
Support LOG_PTRIM and LOG_NLOG if available.
This reduces the binary size by almost 5k.
If you don't like how the diagnostics look on your screen, speak
with your libc vendor about implementing the above NetBSD extensions.
Roy Marples [Wed, 22 Mar 2017 15:34:06 +0000 (15:34 +0000)]
Fix warnings by including the strtoi header.
Roy Marples [Wed, 22 Mar 2017 15:27:45 +0000 (15:27 +0000)]
Use new strtoi changes.
Roy Marples [Wed, 22 Mar 2017 15:24:22 +0000 (15:24 +0000)]
Update strtoi from latest NetBSD.
Roy Marples [Wed, 22 Mar 2017 12:25:25 +0000 (12:25 +0000)]
Fix compile with bpf on OpenBSD.
Roy Marples [Wed, 22 Mar 2017 12:24:51 +0000 (12:24 +0000)]
Fix compile with posix_spawn now being required.
Roy Marples [Wed, 22 Mar 2017 11:27:59 +0000 (11:27 +0000)]
Report correct config test for arc4random_uniform
Roy Marples [Tue, 21 Mar 2017 20:58:35 +0000 (20:58 +0000)]
Remove configure opts for prior.
Roy Marples [Tue, 21 Mar 2017 20:56:59 +0000 (20:56 +0000)]
Remove posix_spawn(3) compat code.
All supported OS's have this in libc now.
Roy Marples [Tue, 21 Mar 2017 20:30:49 +0000 (20:30 +0000)]
Remove getline(3) compat code.
All supported OS's have this in libc now.
Roy Marples [Tue, 21 Mar 2017 20:16:47 +0000 (20:16 +0000)]
Remove the strlcpy compat code and just #define it to snprintf(3).
This is the same and reduces code size.
Roy Marples [Tue, 21 Mar 2017 17:04:52 +0000 (17:04 +0000)]
Place correct license in compat headers.
Roy Marples [Tue, 21 Mar 2017 16:18:40 +0000 (16:18 +0000)]
Remove the cov-int dir when cleaning.
Roy Marples [Tue, 21 Mar 2017 15:28:03 +0000 (15:28 +0000)]
Fix man page paths.
Roy Marples [Tue, 21 Mar 2017 14:12:55 +0000 (14:12 +0000)]
Ignore distribution and Coverity files.
Roy Marples [Tue, 21 Mar 2017 14:08:10 +0000 (14:08 +0000)]
Clean up some definitions.
Roy Marples [Mon, 20 Mar 2017 17:23:51 +0000 (17:23 +0000)]
Use fstat to work out the lease file size and read in one go rather than
use a loop with a small growing buffer.
Roy Marples [Mon, 20 Mar 2017 10:24:49 +0000 (10:24 +0000)]
Test address family to test the correct address flags.
Roy Marples [Mon, 20 Mar 2017 00:44:57 +0000 (00:44 +0000)]
Configure correct hook dir.
Roy Marples [Sun, 19 Mar 2017 20:21:18 +0000 (20:21 +0000)]
Move md5 and sha256 out to compat.
Stop using .. to find config.h.
Roy Marples [Sun, 19 Mar 2017 15:00:45 +0000 (15:00 +0000)]
Move compat out of src.
Roy Marples [Fri, 17 Mar 2017 17:38:42 +0000 (17:38 +0000)]
If the kernel isn't doing DAD for our newly added address, let it pass so we can mark it as DAD complete.
Roy Marples [Thu, 16 Mar 2017 10:01:12 +0000 (10:01 +0000)]
Fix building the distribution.
Roy Marples [Thu, 16 Mar 2017 09:55:41 +0000 (09:55 +0000)]
Fix .gitignore
Roy Marples [Thu, 16 Mar 2017 09:54:30 +0000 (09:54 +0000)]
Move dhcpcd-hooks dir to hooks
Roy Marples [Thu, 16 Mar 2017 09:50:11 +0000 (09:50 +0000)]
Move dhcpcd-hooks outside of src
Roy Marples [Wed, 15 Mar 2017 22:16:18 +0000 (22:16 +0000)]
Disable NTP in the default config.
Roy Marples [Wed, 15 Mar 2017 22:15:01 +0000 (22:15 +0000)]
Disable NTP in the default config.
Roy Marples [Wed, 15 Mar 2017 22:06:12 +0000 (22:06 +0000)]
Move the source files along with dev, crypt and comapt into src dir.
This makes the toplevel directory more manageable.
Roy Marples [Tue, 14 Mar 2017 23:08:19 +0000 (23:08 +0000)]
Markdown improvements.
Roy Marples [Tue, 14 Mar 2017 23:02:40 +0000 (23:02 +0000)]
Use some markdown loving.
Roy Marples [Fri, 10 Mar 2017 21:32:55 +0000 (21:32 +0000)]
If the ARP socket open when starting to probe, re-apply the filter so we capture any changed addresses.
Roy Marples [Fri, 10 Mar 2017 16:11:24 +0000 (16:11 +0000)]
If we get DAD using IPv4LL on NetBSD, delete the address.
Roy Marples [Fri, 10 Mar 2017 14:44:26 +0000 (14:44 +0000)]
Don't crash when calling IPv4LL without an address in state
Roy Marples [Fri, 10 Mar 2017 11:05:02 +0000 (11:05 +0000)]
Only conflict on ARP when sip matches OR sip is INADDR_ANY and
tip matches and we haven't added the address yet.
Roy Marples [Fri, 10 Mar 2017 10:10:44 +0000 (10:10 +0000)]
Only run ARP conflicts for the state if either sip or tip
match the ARP state address.
Roy Marples [Fri, 10 Mar 2017 08:37:04 +0000 (08:37 +0000)]
We're no longer interested in Unicast Poll.
Roy Marples [Fri, 10 Mar 2017 08:36:26 +0000 (08:36 +0000)]
bpf: only interested in direct conflict (sender) or ARP probes.
Roy Marples [Wed, 8 Mar 2017 22:55:59 +0000 (22:55 +0000)]
Fix compile warnings on NetBSD ERLITE.
Roy Marples [Wed, 8 Mar 2017 12:05:57 +0000 (12:05 +0000)]
Reading BPF works fine on SunOS as well.
However, sending BPF appears to go nowhere even though the man page
indicates it should work.
So remove the if_*raw functions from if-sun.c and add a small bpf_send
function which uses DLPI.
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.
Roy Marples [Wed, 8 Mar 2017 09:00:51 +0000 (09:00 +0000)]
Include paths.h for _PATH_BPF
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.
Roy Marples [Mon, 6 Mar 2017 10:18:10 +0000 (10:18 +0000)]
More welcomes to 2017.
Roy Marples [Mon, 6 Mar 2017 10:06:01 +0000 (10:06 +0000)]
Belated welcome to 2017.
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.
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.
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
Roy Marples [Mon, 27 Feb 2017 22:06:11 +0000 (22:06 +0000)]
If a new hostname is set, log it.
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.
Roy Marples [Sun, 26 Feb 2017 10:29:30 +0000 (10:29 +0000)]
Ignore dhcpcd-hooks/50-ypbind
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.
Roy Marples [Sun, 26 Feb 2017 00:23:31 +0000 (00:23 +0000)]
Fix a sign warning.
Roy Marples [Sat, 25 Feb 2017 00:54:16 +0000 (00:54 +0000)]
Add a define to allow noisy ARP debugging.
Roy Marples [Sat, 25 Feb 2017 00:51:55 +0000 (00:51 +0000)]
Ignore ARP Unicast Poll, RFC 1122
Roy Marples [Thu, 23 Feb 2017 01:03:57 +0000 (01:03 +0000)]
Add .gitignore so that generated files are excluded from git.
Roy Marples [Thu, 23 Feb 2017 01:03:08 +0000 (01:03 +0000)]
Detect .git directory and add debugging flags.
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.
Roy Marples [Mon, 23 Jan 2017 17:34:13 +0000 (17:34 +0000)]
Bump dates for prior.
Roy Marples [Mon, 23 Jan 2017 17:32:47 +0000 (17:32 +0000)]
Spelling fixes from abhinav@netbsd.org
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.
Roy Marples [Tue, 17 Jan 2017 12:21:12 +0000 (12:21 +0000)]
It's more correct to say BSD has sa_len.
Roy Marples [Tue, 17 Jan 2017 12:20:15 +0000 (12:20 +0000)]
Newer Illumos defines AF_PACKET which confuses us, so punt it.
Roy Marples [Sun, 15 Jan 2017 13:50:34 +0000 (13:50 +0000)]
Fix runit service handling, [
62772337e0 ].
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 ].
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.
Roy Marples [Mon, 19 Dec 2016 15:10:57 +0000 (15:10 +0000)]
Remove extra waitip from man page, fixed [
b1c7268430 ].
Roy Marples [Tue, 13 Dec 2016 20:39:30 +0000 (20:39 +0000)]
Don't start arping if there is no configuration for it.
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.
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.
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.
Roy Marples [Tue, 29 Nov 2016 21:20:59 +0000 (21:20 +0000)]
Don't trust bootp->sname to be NULL terminated.
Roy Marples [Tue, 29 Nov 2016 20:55:42 +0000 (20:55 +0000)]
Cast away a warning.
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.
Roy Marples [Tue, 29 Nov 2016 19:48:04 +0000 (19:48 +0000)]
Always warn if we cannot open the config file.
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.
Roy Marples [Tue, 29 Nov 2016 18:02:04 +0000 (18:02 +0000)]
Improve if_addrflag handling.
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.
Roy Marples [Wed, 23 Nov 2016 21:10:10 +0000 (21:10 +0000)]
Fix IPv6 DAD on OpenBSD.
Roy Marples [Wed, 23 Nov 2016 21:08:30 +0000 (21:08 +0000)]
Backout prior, added stuff by mistake.
Roy Marples [Wed, 23 Nov 2016 21:05:16 +0000 (21:05 +0000)]
Fix IPv6 DAD on OpenBSD.
Roy Marples [Wed, 23 Nov 2016 19:29:34 +0000 (19:29 +0000)]
Only clear the address family routes we're re-loading.
Roy Marples [Wed, 23 Nov 2016 19:15:41 +0000 (19:15 +0000)]
Fix adding subnet routes without a source address on OpenBSD.
Roy Marples [Sat, 19 Nov 2016 16:15:45 +0000 (16:15 +0000)]
Move ipv6_ctx into dhcpcd_ctx.
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.
Roy Marples [Fri, 18 Nov 2016 18:00:43 +0000 (18:00 +0000)]
Revert prior, it's wrong.
Roy Marples [Fri, 18 Nov 2016 17:40:21 +0000 (17:40 +0000)]
Stop spamming each route change needlessly.
Roy Marples [Fri, 18 Nov 2016 16:41:01 +0000 (16:41 +0000)]
Only compare the address part length as the rest maybe garbage.
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.