]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Seamus [Thu, 31 Mar 2022 22:45:17 +0000 (17:45 -0500)]
Update dhcp.c (#95)
Roy Marples [Sun, 20 Dec 2020 07:08:08 +0000 (07:08 +0000)]
DHCP: Fix reading RENEW messages from inet socket
It helps to use the correct buffer to store the control message ....
Roy Marples [Wed, 10 Jun 2020 06:34:18 +0000 (07:34 +0100)]
DHCP6: Apply delegations to interface on carrier up
Even with DHCP6 turned off for the interface.
As long as it was activated by another interface this is fine.
Roy Marples [Wed, 29 Apr 2020 13:55:23 +0000 (14:55 +0100)]
NetBSD: Gear up for kernel RA removal.
linkmtu will vanish from nd_ifinfo along with other things.
Also, there is not need to pre-fetch ifinfo because flags are no
longer updated when setting ifinfo back again.
Roy Marples [Wed, 10 Jun 2020 06:13:21 +0000 (07:13 +0100)]
Linux: fix compile on old ones
Roy Marples [Tue, 12 May 2020 21:11:22 +0000 (22:11 +0100)]
Bump date for prior
Andrew Childs [Tue, 12 May 2020 21:08:33 +0000 (06:08 +0900)]
Fix neighbor discovery option parsing (#16)
* make_option_mask: use `nd_` prefix for nd options
The prefix for neighbor discovery options was partially changed to
`nd6_` in
d5700a48edf7006369f766d225e70bbca3d8055c . However
set_option_space continued to use `nd_`. This prevented either
`nd6_prefix_information` or `nd_prefix_information` from being parsed
since the former was in the wrong option space, and the latter did not
have the prefix removed.
* manual: fix nd_ and dhcp6_ option prefixes
Roy Marples [Tue, 21 Apr 2020 09:29:32 +0000 (10:29 +0100)]
Release dhcpcd-8.1.9
Roy Marples [Tue, 21 Apr 2020 08:55:50 +0000 (09:55 +0100)]
align CMSG buffer
Roy Marples [Mon, 20 Apr 2020 21:16:24 +0000 (22:16 +0100)]
DHCP: Avoid mis-aligned BOOTP structure
This was caused by the recent change to pass back the frame header.
Roy Marples [Sun, 19 Apr 2020 09:41:11 +0000 (10:41 +0100)]
cast is not needed
Roy Marples [Sun, 12 Apr 2020 17:56:11 +0000 (18:56 +0100)]
Fix small builds.
Roy Marples [Sun, 12 Apr 2020 17:12:46 +0000 (18:12 +0100)]
Release dhcpcd-8.1.8
Roy Marples [Sun, 12 Apr 2020 13:59:52 +0000 (14:59 +0100)]
Fix build on old BSD.
Roy Marples [Thu, 2 Apr 2020 12:10:09 +0000 (13:10 +0100)]
Release dhcpcd-8.1.7
Roy Marples [Wed, 11 Mar 2020 01:13:50 +0000 (01:13 +0000)]
RA: Remove timecheck on sorted router list
Newer is always at the end, mirrors master branch.
Roy Marples [Wed, 11 Mar 2020 01:11:41 +0000 (01:11 +0000)]
RA: Prefer older routers at the preference
Sergey Nikiforov [Tue, 11 Feb 2020 11:07:13 +0000 (11:07 +0000)]
logerr: Use macros to call log functions
This allows downstream implementions to inject their own data
into the log message and/or supply new logging targets whilst
preserving macros such as __FILE__ and __LINE__.
Roy Marples [Sat, 15 Feb 2020 01:50:31 +0000 (01:50 +0000)]
if: Decode vlid from the interface name
This just clarifies the former fix
Roy Marples [Sat, 15 Feb 2020 01:29:13 +0000 (01:29 +0000)]
if: . is part of the interface name, not an alias
fox [Fri, 7 Feb 2020 14:13:59 +0000 (14:13 +0000)]
dhcp: Cast away a compile warning
Roy Marples [Fri, 7 Feb 2020 13:21:14 +0000 (13:21 +0000)]
Linux: mask the NETLINK_GET_STRICT_CHK: Protocol not available error
Just to appease Arch LTS users (packages are built with newer
headers than what kernel supports).
Roy Marples [Fri, 7 Feb 2020 12:52:51 +0000 (12:52 +0000)]
options: Improve AF_INET6 address parsing and logging
Roy Marples [Fri, 7 Feb 2020 12:18:46 +0000 (12:18 +0000)]
inet6: Calculate the prefix in the canonical form
Rather than being clever and getting it wrong.
Roy Marples [Thu, 6 Feb 2020 15:08:21 +0000 (15:08 +0000)]
Add an extra fallthrough to prior
Roy Marples [Thu, 6 Feb 2020 14:59:24 +0000 (14:59 +0000)]
inet6: Swap between DISCOVER and INFORM better
Most of the time this will be dictated by the RA, but let our
config decide as well.
Roy Marples [Thu, 6 Feb 2020 12:58:43 +0000 (12:58 +0000)]
DHCP6: Clean up old lease when we fail to confirm/rebind, etc
Also removed the TIMEOUT states which makes things easier to read.
Roy Marples [Thu, 6 Feb 2020 12:54:11 +0000 (12:54 +0000)]
inet6: Ensure expired routers are cleared after a carrier loss
When we lose carrier, mark all RAs as willexpire and add
the timeout to expire to it's own queue.
On receipt of a matching RA, clear the willexpire flag.
When the above timeout occours, set doexpire on all
RA's with withexpire and then call the general expirera function.
This is needed because expirera can be called at any point.
Roy Marples [Thu, 6 Feb 2020 12:50:31 +0000 (12:50 +0000)]
eloop: define eloop queue numbers in common.h
Allows for easier maintainance.
Petr Gotthard [Wed, 5 Feb 2020 15:35:44 +0000 (15:35 +0000)]
compat: Fix a typo in pidfile when O_CLOEXEC is not defined
While here, include fcntl.h in if.c for older environments.
Roy Marples [Wed, 5 Feb 2020 14:54:49 +0000 (14:54 +0000)]
ARP: Only copy out frame header if we have it.
Frameless does exist.
Roy Marples [Wed, 5 Feb 2020 14:47:08 +0000 (14:47 +0000)]
BPF: Don't use magic in buffer length assignments
Define frame header lengths and frame size maximums.
Use this to calculate required buffer sizes.
Roy Marples [Wed, 5 Feb 2020 13:55:47 +0000 (13:55 +0000)]
DHCP: Support jumbo frames
Also important as we now need to store the frame header in the
initial buffer.
Roy Marples [Wed, 5 Feb 2020 13:29:45 +0000 (13:29 +0000)]
BPF: Return the frame header with the data
For DHCP, we then just skip over the frame header.
For ARP, we extract the frame source and destination addresses
so we can log the source in the event of a conflict.
This is important as a user has found a router which sets the ARP
source and destination hardware addresses to all zeros but unicasts
the ARP straight to our hardware address.
https://serverfault.com/questions/297425/ip-address-conflict-with-mac-address-
000000000000
https://discussions.flightaware.com/t/piaware-wont-reconnect-to-wifi-network-if-it-drops-off/59789
Roy Marples [Tue, 4 Feb 2020 16:30:29 +0000 (16:30 +0000)]
BSD: ignore XEN DOM0 virtual interface xvif
Roy Marples [Tue, 4 Feb 2020 16:29:07 +0000 (16:29 +0000)]
if: decode XEN vif1.2 and xvif1i2 as vif1:2
Roy Marples [Mon, 27 Jan 2020 20:22:21 +0000 (20:22 +0000)]
Release dhcpcd-8.1.6
Christos Zoulas [Mon, 27 Jan 2020 12:56:04 +0000 (12:56 +0000)]
IPv4LL: A state might not always exist when running the script.
For example, we deleted existing IPv4LL addresses that dhcpcd
doesn't directly control when we obtained a DHCP lease.
Roy Marples [Wed, 22 Jan 2020 19:25:14 +0000 (19:25 +0000)]
BSD: Fix INET flags on RTM_NEWADDR messages.
Roy Marples [Wed, 22 Jan 2020 16:21:12 +0000 (16:21 +0000)]
DHCP: Take interface reference on Address Defend failure
As the astate could be freed on dropping the DHCP state.
Roy Marples [Tue, 21 Jan 2020 12:01:02 +0000 (12:01 +0000)]
BSD: Improve RTM_NEWADDR/RTM_DELADDR validaton some more
Roy Marples [Fri, 17 Jan 2020 22:27:18 +0000 (22:27 +0000)]
BSD: Validate RTM_NEWADDR as well
This is important because the address could be added and quickly
deleted and RTM_NEWADDR arrvives after deletion.
Roy Marples [Fri, 17 Jan 2020 16:21:37 +0000 (16:21 +0000)]
inet6: Temporary addresses only work if prefix + ifidlen == 128
Cater for various prefix lengths when using temporay addresses.
Roy Marples [Fri, 17 Jan 2020 13:22:57 +0000 (13:22 +0000)]
inet6: Support a /128 autoconf prefix from RA
This is apparently a thing. Unsure why, but heh ho.
Roy Marples [Fri, 3 Jan 2020 09:48:44 +0000 (09:48 +0000)]
Release dhcpcd-8.1.5
Roy Marples [Thu, 28 Nov 2019 12:09:50 +0000 (12:09 +0000)]
Move some option finialisation so it's available globally.
Roy Marples [Thu, 2 Jan 2020 11:14:13 +0000 (11:14 +0000)]
inet: Allow forcing a host route from an interface without a lease
Anders Kaseorg [Wed, 1 Jan 2020 19:42:47 +0000 (11:42 -0800)]
Linux: fix RA time unit confusion
The RA times are provided in milliseconds, but commit
569051c8aa8fc297eb8edb7bd228e0fd353d30c1 (dhcpcd-8.1.3~18) “Linux:
prefer ms RA times” incorrectly scaled them by an extra factor of 1000
before writing them to retrans_time_ms and base_reachable_time_ms.
Instead, write the values in milliseconds directly to the *_ms files.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Roy Marples [Fri, 20 Dec 2019 22:12:04 +0000 (22:12 +0000)]
Release dhcpcd-8.1.4
Roy Marples [Fri, 20 Dec 2019 22:05:59 +0000 (22:05 +0000)]
options: Fix allocating the script option
When passing PARSE_STRING_NULL we expect to store the string
NULL terminated. As such, allocate space for it an ensure we have
space for it.
Roy Marples [Fri, 20 Dec 2019 11:38:14 +0000 (11:38 +0000)]
Release dhcpcd-8.1.3
Roy Marples [Sat, 7 Dec 2019 17:06:18 +0000 (17:06 +0000)]
DHCP: dl is always >0 at this point, so remove check.
Found by the LGTM bot.
Roy Marples [Wed, 11 Dec 2019 16:09:18 +0000 (16:09 +0000)]
compat: Add a guard to _strtoi.h
Not really needed but LGTM wants it which blows.
Should really take this upstream.....
Roy Marples [Wed, 18 Dec 2019 14:16:18 +0000 (14:16 +0000)]
Linux: Move RTA_OK and RTA_NEXT from a while to a for loop.
Roy Marples [Thu, 19 Dec 2019 15:36:31 +0000 (15:36 +0000)]
DHCP: Ensure we have a lease to extract options from.
Roy Marples [Tue, 17 Dec 2019 22:32:21 +0000 (22:32 +0000)]
DHCP6: Remove now unused vars
Roy Marples [Tue, 17 Dec 2019 22:23:56 +0000 (22:23 +0000)]
DHCP6: Add disabled code to allow packet replay
I get bored of adding similar code from time to time just to
aid debugging, so let's just add it in.
Someone else might find it useful too.
Roy Marples [Tue, 17 Dec 2019 22:16:26 +0000 (22:16 +0000)]
DHCP6: Rework delegation deprecation
Split ipv6_addaddrs out so ipv6_doaddr can operate on a single address.
Call this when deprecating delegated addresses to avoid calling
ipv6_addaddrs.
This allows a more simple ipv6_addaddrs that doesn't need to test
which address collection we are deleting from and removes DHCPv6
specific code from the generic IPv6 module.
Roy Marples [Mon, 16 Dec 2019 16:56:17 +0000 (16:56 +0000)]
DHCP6: Fix deprecating a delegated prefix
Be sure to remove the address using the right TAILQ member.
While here, simplify the initialisation of pd_pfxs.
Roy Marples [Mon, 16 Dec 2019 12:32:43 +0000 (12:32 +0000)]
options: Suboption 3 of NTP Server is a FQDN
As such it should be domain and not ip6address.
Roy Marples [Thu, 12 Dec 2019 14:06:20 +0000 (14:06 +0000)]
DHCP: Don't warn about expiry of deprecated addresses
Roy Marples [Tue, 10 Dec 2019 21:44:24 +0000 (21:44 +0000)]
IPv6ND: Fix reachable test
Roy Marples [Fri, 29 Nov 2019 23:53:11 +0000 (23:53 +0000)]
dhcpcd: Only report SSID when we have a carrier
Roy Marples [Wed, 27 Nov 2019 15:06:47 +0000 (15:06 +0000)]
DHCP6: Fix prior to log an error
Roy Marples [Tue, 26 Nov 2019 19:58:42 +0000 (19:58 +0000)]
DHCP6: Improve API for privsep
Roy Marples [Tue, 26 Nov 2019 19:57:30 +0000 (19:57 +0000)]
DHCP: Improve API for privsep
Roy Marples [Tue, 19 Nov 2019 22:02:05 +0000 (22:02 +0000)]
Linux: remove XX debug
Roy Marples [Tue, 19 Nov 2019 21:13:15 +0000 (21:13 +0000)]
Linux: Support kernels without PR_SET_MM_MAP
Roy Marples [Sun, 17 Nov 2019 19:57:27 +0000 (19:57 +0000)]
Linux: prefer ms RA times
The old sysctls have apparently been deprecated since 2.6.12.
Sascha Wildner [Fri, 15 Nov 2019 11:28:28 +0000 (11:28 +0000)]
Spelling fixes
Roy Marples [Wed, 13 Nov 2019 10:23:52 +0000 (10:23 +0000)]
Release dhcpcd-8.1.2
Roy Marples [Tue, 12 Nov 2019 16:01:50 +0000 (16:01 +0000)]
dhcpcd: report SSID connected to when we gain carrier
Helps debugging without the need for explicit debug.
Roy Marples [Sun, 10 Nov 2019 21:12:31 +0000 (21:12 +0000)]
RA: Set mtu to zero and then pull in the MTU option if any
Incase the router sets it back to unspecified.
Nathan Houghton [Sun, 10 Nov 2019 20:53:11 +0000 (20:53 +0000)]
OpenBSD: Support LINK_STATE_HALF_DUPLEX and LINK_STATE_FULL_DUPLEX
For if_msghdr messages from route(4).
Roy Marples [Sun, 10 Nov 2019 20:43:04 +0000 (20:43 +0000)]
IPv6ND: If a router is reachable again, don't solicit another.
Roy Marples [Sun, 10 Nov 2019 20:39:52 +0000 (20:39 +0000)]
RA: Warn if advertised MTU is greater than link MTU
Roy Marples [Sun, 10 Nov 2019 15:15:16 +0000 (15:15 +0000)]
BSD: Try and set linkmtu for the interface just to be nice.
If it fails, zero it out and try again - only the linkmtu should
fail really. This is fine as we fix it against the route itself.
Roy Marples [Sun, 10 Nov 2019 02:46:27 +0000 (02:46 +0000)]
OpenBSD: Fix prior - OS cannot set any RA bits such as hop limit.
Roy Marples [Sat, 9 Nov 2019 22:22:59 +0000 (22:22 +0000)]
BSD: strlcpy > strncpy
Roy Marples [Sat, 9 Nov 2019 22:22:28 +0000 (01:22 +0300)]
Solaris: Fix compile with prior
Roy Marples [Sat, 9 Nov 2019 22:14:28 +0000 (22:14 +0000)]
Linux: fix compile for prior
Roy Marples [Sat, 9 Nov 2019 22:03:19 +0000 (22:03 +0000)]
INET6: Apply hoplimit, reachable and retrans timer values from RA.
Only tested thus far on NetBSD.
While here, fix prior to not lose the first sorted route.
Roy Marples [Sat, 9 Nov 2019 14:37:54 +0000 (14:37 +0000)]
INET6: Sort routers when reachability changes
If unreachable, try and install a better default router.
Roy Marples [Wed, 6 Nov 2019 12:22:28 +0000 (12:22 +0000)]
script: Ensure pid is initialised.
Roy Marples [Tue, 5 Nov 2019 21:54:32 +0000 (21:54 +0000)]
DHCP: When rebinding ensure we have a DHCP ARP state
So we can defend the address.
Roy Marples [Tue, 5 Nov 2019 21:01:19 +0000 (21:01 +0000)]
Linux: rename _open_link_socket to if_linksocket
Roy Marples [Tue, 5 Nov 2019 17:18:02 +0000 (17:18 +0000)]
Linux: improve the netlink API more
By putting the callback arg with the callback function.
Roy Marples [Tue, 5 Nov 2019 16:23:02 +0000 (16:23 +0000)]
build: Improve detection of dlopen(3) in libdl
Roy Marples [Tue, 5 Nov 2019 16:22:39 +0000 (16:22 +0000)]
dev: remove pointless cast
Roy Marples [Tue, 5 Nov 2019 15:52:57 +0000 (15:52 +0000)]
INET: Fix corruption of IPv4 address flags when renewing
What a mistaka to maka!
Roy Marples [Tue, 5 Nov 2019 15:23:10 +0000 (15:23 +0000)]
Linux: always open a netlink socket when writing netlink messages
While here, bring some function names into the same style.
Roy Marples [Mon, 4 Nov 2019 20:21:30 +0000 (20:21 +0000)]
build: Improve import-src target
Incase a supposed source file file does not exist.
Roy Marples [Mon, 4 Nov 2019 20:02:36 +0000 (20:02 +0000)]
and more pretty
Roy Marples [Mon, 4 Nov 2019 19:56:32 +0000 (19:56 +0000)]
build: make prior output more pretty
Roy Marples [Mon, 4 Nov 2019 19:56:51 +0000 (19:56 +0000)]
build: Check compiler actually supports address sanitisation.
Roy Marples [Mon, 4 Nov 2019 17:21:33 +0000 (17:21 +0000)]
BSD: Disable kernel RTADV sysctl earlier
Just makes life a bit easier.
Roy Marples [Sun, 3 Nov 2019 23:24:09 +0000 (23:24 +0000)]
build: Enforce address sanitisaton when debugging.
Roy Marples [Sun, 3 Nov 2019 10:13:54 +0000 (10:13 +0000)]
dhcpcd: Set ctx.ifaces to NULL after freeing
Because they it might be used trying to find an interface to assign
our option routes to when freed if never used.
Roy Marples [Fri, 1 Nov 2019 23:34:37 +0000 (23:34 +0000)]
eloop: Fix a segfault if we free a NULL eloop
Roy Marples [Fri, 1 Nov 2019 23:29:06 +0000 (23:29 +0000)]
control: when closing, remove from eloop.