]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Wed, 9 Oct 2019 12:37:12 +0000 (13:37 +0100)]
BSD: Ignore the firewire interface as well.
Roy Marples [Wed, 9 Oct 2019 12:34:34 +0000 (13:34 +0100)]
BSD: Ignore interface groups as we would the interface name
Incase someone renames tap0 to foo4.
Roy Marples [Wed, 9 Oct 2019 11:47:06 +0000 (12:47 +0100)]
if: Ignore TAP interfaces by default
TAP interfaces are virtual ethernet and not really distinguishable
from real interfaces other than the interface name.
On BSD the interfaces are always called tapN.
Roy Marples [Wed, 9 Oct 2019 10:28:03 +0000 (11:28 +0100)]
DHCP6: Work better with infinite addresses
And as such just log infinite lease rather than an arbitary
number.
Roy Marples [Tue, 8 Oct 2019 20:05:56 +0000 (21:05 +0100)]
ARP: remove surperfluous diagnostic.
Roy Marples [Tue, 8 Oct 2019 12:58:30 +0000 (13:58 +0100)]
ARP: Linux doesn't send a Gratuitous ARP for new addresses
Roy Marples [Tue, 8 Oct 2019 12:35:50 +0000 (13:35 +0100)]
ARP: Don't send an initial ARP announcement for newly added addresses
The kernel will do this for us.
Roy Marples [Tue, 8 Oct 2019 11:42:52 +0000 (12:42 +0100)]
arp: Fix an obvious typo and remove pragma
Obvious typo is obvious and I feel pretty dumb right now....
Roy Marples [Tue, 8 Oct 2019 11:17:22 +0000 (12:17 +0100)]
route: Don't log error when adding a route which already exists
Add a comment to explain why.
Roy Marples [Tue, 8 Oct 2019 10:56:11 +0000 (11:56 +0100)]
gcc: Only disable pragma for gcc>5 to avoid can't disable warnings
Roy Marples [Tue, 8 Oct 2019 10:29:15 +0000 (11:29 +0100)]
IPv4LL: Pick a different address at conflict
The start function will be called at carrier up and may rightly
pick the last assigned address. So, we need to ensure we pick the
next address we want to try at any conflict.
If any conflict, cancel any ARP state.
Roy Marples [Wed, 2 Oct 2019 16:06:18 +0000 (17:06 +0100)]
DHCP: Don't exit on static DaD failure if master or using IPv6.
As RA and DHCPv6 work fine too.
Roy Marples [Wed, 2 Oct 2019 16:01:02 +0000 (17:01 +0100)]
inet: Rework prior incase DHCP uses an IPv4LL address
Highly unlikely, but still technically possible.
Roy Marples [Tue, 1 Oct 2019 18:33:22 +0000 (19:33 +0100)]
DHCP: Don't log diagnostics when state is not running
Roy Marples [Tue, 1 Oct 2019 18:09:34 +0000 (19:09 +0100)]
IPv4LL: Fix DAD failure on NetBSD
Roy Marples [Tue, 1 Oct 2019 18:08:36 +0000 (19:08 +0100)]
inet: use ntohl with IN_LINKLOCAL
Roy Marples [Tue, 1 Oct 2019 17:41:15 +0000 (18:41 +0100)]
IPv4LL: Ensure we pick another address on DAD conflict via ARP
While here correct an error diagnostic logging an system error too.
Roy Marples [Tue, 1 Oct 2019 16:21:00 +0000 (17:21 +0100)]
gcc: Compile with older GCC again.
Roy Marples [Tue, 1 Oct 2019 16:09:10 +0000 (17:09 +0100)]
DHCP: Don't start DHCP if we fail DAD for static or informed addrs
Roy Marples [Tue, 1 Oct 2019 16:06:43 +0000 (17:06 +0100)]
inet: clarify prior with comment
Roy Marples [Tue, 1 Oct 2019 16:01:49 +0000 (17:01 +0100)]
inet: Either call the IPv4LL handler or the DHCP handler - not both
Roy Marples [Tue, 1 Oct 2019 15:01:37 +0000 (16:01 +0100)]
control.h needs stdbool.h to compile
Roy Marples [Tue, 1 Oct 2019 15:00:30 +0000 (16:00 +0100)]
BPF: Ensure packet is big enough for a UDP structure and payload
Roy Marples [Thu, 19 Sep 2019 19:48:12 +0000 (20:48 +0100)]
DHCP: Don't send force renew none or reconf accept if not asked for
Roy Marples [Thu, 19 Sep 2019 19:44:44 +0000 (20:44 +0100)]
options: Allow domain spaced options
Such as:
nooption dhcp6_sol_max_rt, dhcp6_reconfigure_accept
Roy Marples [Thu, 19 Sep 2019 18:20:16 +0000 (19:20 +0100)]
DHCP: Don't request an automatically requested option if not wanted
This handy macro also simplifies the logic a little.
Roy Marples [Thu, 19 Sep 2019 07:54:08 +0000 (08:54 +0100)]
DragonFlyBSD: rc.d scripts need onestatus also ....
Roy Marples [Wed, 18 Sep 2019 12:59:03 +0000 (13:59 +0100)]
dhcpcd: Check carrier directly after a route socket overflow
Check carrier directly rather than using LINK_UNKNOWN as that
will be forced down for wireless cards.
Roy Marples [Tue, 17 Sep 2019 11:24:22 +0000 (12:24 +0100)]
Linux: Remove unused BPF defines
These have lived in bpf.c for a while now.
Roy Marples [Tue, 17 Sep 2019 10:45:45 +0000 (11:45 +0100)]
DHCP: Rename dhcp_handlepacket to dhcp_handlebpf
This makes it a lot more clear as to the intent of the code
and it's not to handle from UDP.
Roy Marples [Tue, 17 Sep 2019 08:20:23 +0000 (09:20 +0100)]
DHCP: Improve from/to address selection
While here add a comment about broadcasting over UDP,
why we don't do it and why we need BPF.
Roy Marples [Tue, 17 Sep 2019 08:19:02 +0000 (09:19 +0100)]
DHCP: Re-enable the debug log of already bound messages
It's handy for debugging from whence the packet came even if
already bound.
Roy Marples [Tue, 17 Sep 2019 08:17:53 +0000 (09:17 +0100)]
DHCP: Rename dhcp_readpacket to dhcp_readbpf
So it's clear as to it's purpose, like dhcp_readudp.
Roy Marples [Fri, 13 Sep 2019 17:33:25 +0000 (20:33 +0300)]
Dilos: work with Debian style configure calling
Roy Marples [Fri, 13 Sep 2019 13:09:20 +0000 (14:09 +0100)]
DHCP: pretify error of invalid packet.
Roy Marples [Fri, 13 Sep 2019 11:45:52 +0000 (12:45 +0100)]
Release dhcpcd-8.0.6
Maciej S. Szmigiero [Fri, 13 Sep 2019 11:42:17 +0000 (12:42 +0100)]
DHCP: Check we have enough for data for IP header as well.
This is totally my bad - Maciej's patch had this length check in
but somehow my patch import lost it.
Roy Marples [Fri, 13 Sep 2019 11:37:59 +0000 (12:37 +0100)]
build: Put small and non small definitions in dhcpcd-embedded
This allows for easy source importing and the build can decide
which variant they want.
Roy Marples [Fri, 13 Sep 2019 10:54:03 +0000 (11:54 +0100)]
build: distclean now recursively removes patch files and related
Roy Marples [Fri, 13 Sep 2019 10:24:06 +0000 (11:24 +0100)]
Release dhcpcd-8.0.5
Roy Marples [Fri, 13 Sep 2019 10:23:48 +0000 (11:23 +0100)]
git: ignore patch files
Maciej S. Szmigiero [Fri, 13 Sep 2019 09:53:25 +0000 (10:53 +0100)]
DHCP: Ensure we have enough data to checksum IP and UDP
While here, only skip UDP checksum after we have verified we
have enough data to be doubly sure.
Fixes a regression introduced in dhcpcd-7.2.0 when we started
to read from the UDP socket rather than just the BPF socket
where these checks are already made.
Roy Marples [Fri, 13 Sep 2019 09:43:51 +0000 (10:43 +0100)]
DHCP: Give a better message when packet validation failes
We return ERANGE for underflow and ENOBUFS for overflow,
but these error strings could be misleading.
For EINVAL report invalid checksum, otherwise invalid UDP packet.
Roy Marples [Mon, 9 Sep 2019 20:18:36 +0000 (21:18 +0100)]
BSD: avoid RTF_WASCLONED routes
Roy Marples [Sun, 8 Sep 2019 21:46:55 +0000 (22:46 +0100)]
man: Fix lint errors.
Roy Marples [Fri, 6 Sep 2019 11:52:22 +0000 (12:52 +0100)]
DHCP: If root fs is network mounted, enable last lease extend
We don't want expiry to unmount the root FS.
Also, we don't want a reboot with an expired lease to kill
our current assignment either.
Only works on NetBSD right now.
Roy Marples [Fri, 6 Sep 2019 10:37:20 +0000 (11:37 +0100)]
Remove unused headers.
Roy Marples [Thu, 5 Sep 2019 09:03:13 +0000 (10:03 +0100)]
inet6: Fix default route not being installed
We need to check for global addresses on any forwarding interface,
not just the interface we received the RA on.
Otherwise this breaks routers who get a default route only
from the RA and IPv6 addresses only by prefix delegation to
other interfaces.
Roy Marples [Thu, 5 Sep 2019 08:35:23 +0000 (09:35 +0100)]
build: Fix DragonFlyBSD config for import.
Roy Marples [Wed, 4 Sep 2019 18:36:34 +0000 (19:36 +0100)]
build: Add dhcpcd.conf to import-src
Roy Marples [Wed, 4 Sep 2019 13:12:33 +0000 (14:12 +0100)]
Release dhcpcd-8.0.4
Roy Marples [Wed, 4 Sep 2019 12:09:29 +0000 (15:09 +0300)]
Solaris: Only set IFF_NOLOCAL for onlink only prefixes
As per the header: /* No address - just on-link subnet */
Roy Marples [Wed, 4 Sep 2019 11:53:04 +0000 (14:53 +0300)]
Solaris: diable IFF_NOLOCAL for inet for now
Roy Marples [Wed, 4 Sep 2019 11:11:31 +0000 (12:11 +0100)]
control: Add safety check to queue data
Roy Marples [Wed, 4 Sep 2019 11:00:25 +0000 (12:00 +0100)]
DHCP6: Solve a scan-build error
It can't happen, but let's make it happy anyway.
Roy Marples [Wed, 4 Sep 2019 10:25:12 +0000 (11:25 +0100)]
Linux: cast away a compile warning
Roy Marples [Wed, 4 Sep 2019 10:23:16 +0000 (11:23 +0100)]
DHCP: Don't leak the malloc of the truncated lease file
Roy Marples [Wed, 4 Sep 2019 09:21:08 +0000 (12:21 +0300)]
Solaris: Get the subnet in ipv6 ifa handler
This simplifies the code and allows onlink route "addresses"
to work on P2P interfaces.
Roy Marples [Wed, 4 Sep 2019 03:53:33 +0000 (06:53 +0300)]
Solaris: remove development warning, all looks good now :)
Roy Marples [Wed, 4 Sep 2019 03:48:11 +0000 (06:48 +0300)]
Solaris: Harden prior for IFF_POINTOPOINT
Roy Marples [Wed, 4 Sep 2019 03:38:22 +0000 (06:38 +0300)]
Solaris: Improve prior
Roy Marples [Wed, 4 Sep 2019 03:30:55 +0000 (06:30 +0300)]
Solaris: getifaddrs(3) lacks subnet address, so hack into dstaddr
TOTAL HACK ALERT!
Abuse dstaddr due to lack of subnetaddr in struct ifaddrs.
Also, get the subnet address when learning and from route messages
if the INET6 address is unspecified.
Roy Marples [Wed, 4 Sep 2019 01:36:33 +0000 (02:36 +0100)]
Solaris: Fix issue with prior on other OS
Roy Marples [Wed, 4 Sep 2019 01:34:23 +0000 (04:34 +0300)]
Solaris: Sending NA now seems to work!
Roy Marples [Wed, 4 Sep 2019 01:07:24 +0000 (04:07 +0300)]
Solaris: This comment no longer applies
Roy Marples [Wed, 4 Sep 2019 00:58:27 +0000 (03:58 +0300)]
Solaris: Fix Prefix routes without an address
These need to be added as subnet's and no address.
Kinda back to front, but heh ho.
Roy Marples [Tue, 3 Sep 2019 22:38:50 +0000 (01:38 +0300)]
Solaris: Fix address flags
We can use a lack of IFF_UP to set IN{,6}_IFF_TENTATIVE as well.
Roy Marples [Tue, 3 Sep 2019 20:20:57 +0000 (23:20 +0300)]
Solaris: plumb interface at init if does not exist
This makes dhcpcd go so much easier.
The only downside is that you always get an unspecified address
on the default LUN for each compiled protocol regardless of
if you use it or not.
Roy Marples [Tue, 3 Sep 2019 11:40:13 +0000 (12:40 +0100)]
DHCP: Don't listen on the unspecified address when not in master mode
Otherwise we will swallow messages for another interface.
If we fail to bind to the address:BOOTPC socket then re-open
BPF. This could be due to address sharing (which isn't supported
withoutn master mode) or even worse another DHCP client running
on the same address. In this case, re-open BPF so we can listen
to RECONFIGURE messages.
Roy Marples [Mon, 2 Sep 2019 17:33:47 +0000 (17:33 +0000)]
Solaris: Bring across recent BSD improvements
Roy Marples [Mon, 2 Sep 2019 11:07:03 +0000 (12:07 +0100)]
BSD: RTM_MISS doesn't always have a gateway
And thus no interface to bind to.
Use lo0 in this case.
Roy Marples [Sun, 1 Sep 2019 20:29:46 +0000 (21:29 +0100)]
BSD: Handle RTM_MISS
RTM_MISS is sent when an address is not resolvable.
This means that we want to use it but don't know how to reach it
and thus is neighbour unreachable.
If it's the address a RA came from and we don't have any others
on that interface, solicit a new RA.
We still handle RTM_DELETE as RTM_MISS as the address llentry
could have been gc'ed or manually deleted and is thus
unreachable.
Roy Marples [Sun, 1 Sep 2019 20:26:39 +0000 (21:26 +0100)]
DHCP: Don't log an error if the lease file is empty
Roy Marples [Fri, 30 Aug 2019 14:33:05 +0000 (15:33 +0100)]
Cast away a conversion warning with prior
Roy Marples [Fri, 30 Aug 2019 14:27:09 +0000 (15:27 +0100)]
DHCP: Fix in_cksum for big endian
Roy Marples [Fri, 30 Aug 2019 11:50:00 +0000 (12:50 +0100)]
Better fix for prior.
Roy Marples [Fri, 30 Aug 2019 11:20:02 +0000 (12:20 +0100)]
Fix a crash for ipv4 only.
Roy Marples [Fri, 30 Aug 2019 10:40:13 +0000 (11:40 +0100)]
Cast away an alignment error for FreeBSD and OpenBSD.
Roy Marples [Fri, 30 Aug 2019 10:34:44 +0000 (10:34 +0000)]
Solaris: Fix compile.
Roy Marples [Fri, 30 Aug 2019 10:13:01 +0000 (11:13 +0100)]
Linux: fix compile.
Roy Marples [Fri, 30 Aug 2019 10:06:20 +0000 (11:06 +0100)]
inet6: Stop reacting to kernel neighbour messages about a router
It's unreliable and very corner case.
See the comment for the ipv6nd_neighbour() function.
Roy Marples [Thu, 29 Aug 2019 18:14:21 +0000 (19:14 +0100)]
Merge branch 'master' of roy.marples.name:/var/git/dhcpcd
Roy Marples [Thu, 29 Aug 2019 18:10:53 +0000 (19:10 +0100)]
inet6: Stop listening to NA messages
This is very expensive, and we only listen for them for the
Router -> Host flag change. Linux and now NetBSD announce this
change via the netlink/routing socket so there is no longer a
need to listen for it.
RFC 4861 6.2.5 only says departing routers *SHOULD* send RA
with lifetime of zero and *MUST* send all subsequent NA messages
with the router flag unset, so dhcpcd *SHOULD* still work.
For the corner case where it doesn't, consider patching your
kernel.
Roy Marples [Thu, 29 Aug 2019 18:04:21 +0000 (19:04 +0100)]
BSD: Listen for Router -> Host messages via RTM_CHANGE
If there is a lladdr in the gateway address then the node
has become reachable. If there is no lladdr in the gateway address
then the node is no longer a router.
Unreachable is sent via RTM_DELETE and we ignore the initial
RTM_ADD without a lladdr.
Roy Marples [Wed, 28 Aug 2019 21:58:43 +0000 (22:58 +0100)]
build: Fix import-src on FreeBSD
Roy Marples [Wed, 28 Aug 2019 21:57:11 +0000 (22:57 +0100)]
OpenBSD: Fix compile
Roy Marples [Wed, 28 Aug 2019 21:41:11 +0000 (22:41 +0100)]
build: Fix import-src when there is no compat to import.
Roy Marples [Wed, 28 Aug 2019 21:30:52 +0000 (22:30 +0100)]
build: Allow DESTDIR to work for import as well.
Roy Marples [Wed, 28 Aug 2019 20:59:28 +0000 (21:59 +0100)]
build: Note import-src target.
Roy Marples [Wed, 28 Aug 2019 20:33:38 +0000 (21:33 +0100)]
build: define ${ECHO}
Roy Marples [Wed, 28 Aug 2019 19:35:27 +0000 (20:35 +0100)]
build: import-src now works with DESTDIR
Roy Marples [Wed, 28 Aug 2019 15:30:13 +0000 (16:30 +0100)]
Note dev modules are for Linux only.
Roy Marples [Wed, 28 Aug 2019 15:15:04 +0000 (16:15 +0100)]
DragonFly: make import-src now prepares the source for importing
I'm a lazy man and there's too many steps to import dhcpcd into
DragonFlyBSD, so hopefully this makes it a lot easier.
Roy Marples [Wed, 28 Aug 2019 14:07:13 +0000 (15:07 +0100)]
Fix compile on Linux.
Roy Marples [Wed, 28 Aug 2019 12:55:02 +0000 (13:55 +0100)]
rbtree: Fix building from a DragonFlyBSD import
Roy Marples [Wed, 28 Aug 2019 12:52:38 +0000 (13:52 +0100)]
queue: Support TAILQ_FOREACH_MUTABLE
Basically another name for TAILQ_FOREACH_SAFE.
Roy Marples [Wed, 28 Aug 2019 12:50:06 +0000 (13:50 +0100)]
DragonFlyBSD: hooks live in /usr/libexec
Which is inconsitent with dhcpcd living in /sbin!
Still, that's what it is. While here, if the build system
defines directories, don't re-define them.
Sascha Wildner [Wed, 28 Aug 2019 09:46:35 +0000 (10:46 +0100)]
Man page improvements.
Roy Marples [Wed, 28 Aug 2019 09:43:34 +0000 (10:43 +0100)]
Whitespace police.
Sascha Wildner [Wed, 28 Aug 2019 02:18:04 +0000 (03:18 +0100)]
Add some missing whitespace.