]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Tue, 17 May 2016 20:26:09 +0000 (20:26 +0000)]
Use DLPI to send and receive ARP and BOOTP packets.
Use pfmod to filter the packets we want in the kernel.
Roy Marples [Mon, 16 May 2016 15:43:23 +0000 (15:43 +0000)]
Only accept BOOTREPLY.
Roy Marples [Mon, 16 May 2016 15:19:28 +0000 (15:19 +0000)]
More DHCP -> BOOTP.
Roy Marples [Sat, 14 May 2016 16:35:23 +0000 (16:35 +0000)]
dhcp_bpf_filter -> bootp_bpf_filter (and DHCP -> BOOTP for ports).
Roy Marples [Sat, 14 May 2016 12:57:32 +0000 (12:57 +0000)]
No point in looping on the raw socket anymore thanks to eloop.
This allows endless DHCP / ARP to be interuptable.
Roy Marples [Sat, 14 May 2016 10:38:15 +0000 (10:38 +0000)]
Use UNCONST
Roy Marples [Fri, 13 May 2016 15:53:57 +0000 (15:53 +0000)]
Give some context to if_closeraw
Roy Marples [Fri, 13 May 2016 15:41:58 +0000 (15:41 +0000)]
Rework the raw packet API so we work directly with a fd.
It's possible the underlying mechanism might not use the fd as a primary
resource, so add the if_closeraw() function.
Roy Marples [Fri, 13 May 2016 13:59:24 +0000 (13:59 +0000)]
whitespace
Roy Marples [Fri, 13 May 2016 10:35:35 +0000 (10:35 +0000)]
Improve memory allocation parsing routes and provide a better
diagnostic if the interface for it cannot be found.
Roy Marples [Fri, 13 May 2016 10:33:15 +0000 (10:33 +0000)]
lo0 doesn't appear in dlpi_walk, so create an empty AF_LINK for it.
Roy Marples [Fri, 13 May 2016 10:31:00 +0000 (10:31 +0000)]
If we don't have a broadcast address, set zero on assignment.
Roy Marples [Thu, 12 May 2016 16:51:36 +0000 (16:51 +0000)]
Learn about routing tables on Solaris.
Roy Marples [Thu, 12 May 2016 10:45:21 +0000 (10:45 +0000)]
initrt should really take dhcpcd_ctx as an argument.
Roy Marples [Wed, 11 May 2016 14:17:15 +0000 (14:17 +0000)]
Handle truncated DHCP messages, provided only the BOOTP vendor area is
truncated. Fixes [
3f10c9b871 ].
Roy Marples [Tue, 10 May 2016 07:37:30 +0000 (07:37 +0000)]
Avoid a "conversion to '__uint16_t' from 'int' may alter its value"
error on some architectures (like m68k).
Thanks to Martin Husemann.
Roy Marples [Mon, 9 May 2016 10:41:59 +0000 (10:41 +0000)]
Note dhcpcd -v in options, fixes [
46237d7e79 ].
Roy Marples [Mon, 9 May 2016 09:35:34 +0000 (09:35 +0000)]
Release dhcpcd-6.11.0
Roy Marples [Mon, 9 May 2016 08:22:38 +0000 (08:22 +0000)]
Preserve lo0 routes if the global default is to persist.
Roy Marples [Sun, 8 May 2016 15:44:12 +0000 (15:44 +0000)]
Fix deleting the reject route on Linux, [
efc359da01 ].
Roy Marples [Sun, 8 May 2016 10:18:49 +0000 (10:18 +0000)]
No need for ;
Roy Marples [Sat, 7 May 2016 21:27:34 +0000 (21:27 +0000)]
Whitespace.
Roy Marples [Sat, 7 May 2016 21:25:02 +0000 (21:25 +0000)]
Fix option concatenation.
Roy Marples [Sat, 7 May 2016 20:40:40 +0000 (20:40 +0000)]
When removing delegated addresses, ensure the reject route is restored.
Roy Marples [Sat, 7 May 2016 19:58:11 +0000 (19:58 +0000)]
White space.
Roy Marples [Sat, 7 May 2016 19:55:48 +0000 (19:55 +0000)]
Don't realloc delegated prefixes needlessly.
Roy Marples [Sat, 7 May 2016 19:53:54 +0000 (19:53 +0000)]
Revert prior
Roy Marples [Sat, 7 May 2016 12:21:35 +0000 (12:21 +0000)]
Remember the delegating prefix rather than the delegating interface.
This allows us to clear the NOREJECT flag if we ever delete the delegated
address.
Roy Marples [Sat, 7 May 2016 12:20:36 +0000 (12:20 +0000)]
Always set HAVE_REALLOCARRAY so that eloop can use it.
Roy Marples [Fri, 6 May 2016 20:51:37 +0000 (20:51 +0000)]
Use libc reallocarray in eloop if we have it.
Roy Marples [Fri, 6 May 2016 20:44:24 +0000 (20:44 +0000)]
Check we actually have options allocated before adding commandline options.
Roy Marples [Fri, 6 May 2016 20:09:09 +0000 (20:09 +0000)]
Fix a bogus clang analyzer warning on BSD by moving an assignment slightly higher up.
Roy Marples [Fri, 6 May 2016 18:45:01 +0000 (18:45 +0000)]
Don't install a reject route if the prefix is the same as the delegation, [
efc359da01 ].
Roy Marples [Fri, 6 May 2016 18:15:41 +0000 (18:15 +0000)]
No need to check if the passed pointer is valid.
Roy Marples [Fri, 6 May 2016 16:28:54 +0000 (16:28 +0000)]
Fix some memory issues.
Roy Marples [Fri, 6 May 2016 16:23:26 +0000 (16:23 +0000)]
Free the getline buffer if needed.
Roy Marples [Fri, 6 May 2016 16:01:54 +0000 (16:01 +0000)]
Move duid and ipv6 secret file reading code into a common function.
Roy Marples [Fri, 6 May 2016 14:46:32 +0000 (14:46 +0000)]
Move packet buffer from dhcpcd context to a generic stack variable based on MTU_MAX.
Roy Marples [Fri, 6 May 2016 13:26:41 +0000 (13:26 +0000)]
DHCP messages are really BOOTP so lets name the structure accordingly.
While here, stop making assumptions about the size of a DHCP packet based
on a fixed structure from a default MTU of 1500.
Instead, make it flexable and set the DHCP packet size to the interface MTU
less UDP and IP headers.
As a result, we need to know the size of the DHCP packet received
rather than just walking the old fixed DHCP message structure.
This makes Coverity happy about tainted scalar values when parsing DHCP
messages.
Roy Marples [Fri, 6 May 2016 13:02:41 +0000 (13:02 +0000)]
Move dhcp6's read lease code into dhcp-common.
While here, fix MTU min/max.
Roy Marples [Fri, 6 May 2016 12:51:01 +0000 (12:51 +0000)]
Check a calloc failure.
Roy Marples [Wed, 4 May 2016 13:07:10 +0000 (13:07 +0000)]
Fix comment.
Roy Marples [Wed, 4 May 2016 13:05:52 +0000 (13:05 +0000)]
Remove random() from a potential htonl() macro which could call it more than once.
Roy Marples [Wed, 4 May 2016 12:34:13 +0000 (12:34 +0000)]
Read from BPF into a void pointer aliased to the buffer so that
Coverity doesn't treat the data as tainted.
Of course it's tainted, but Coverity doesn't undertand our rules
ensuring the data is clean.
Roy Marples [Wed, 4 May 2016 12:32:29 +0000 (12:32 +0000)]
Fix returning a pid if open fails.
Roy Marples [Wed, 4 May 2016 11:51:44 +0000 (11:51 +0000)]
Fix compile.
Roy Marples [Wed, 4 May 2016 11:48:51 +0000 (11:48 +0000)]
Check for NULL.
Roy Marples [Wed, 4 May 2016 11:39:37 +0000 (11:39 +0000)]
Fix reallocarray test
Roy Marples [Wed, 4 May 2016 11:02:44 +0000 (11:02 +0000)]
Optimize code to find a route interface.
While here, fix a memory issue.
Roy Marples [Tue, 3 May 2016 23:54:20 +0000 (23:54 +0000)]
Use void * to read the DHCP lease file as that seems to pass the Coverity
tests.
Roy Marples [Tue, 3 May 2016 23:19:57 +0000 (23:19 +0000)]
Use a union to read an old lease.
Roy Marples [Tue, 3 May 2016 22:50:53 +0000 (22:50 +0000)]
Apply a bit more security around parsing DHCP.
Roy Marples [Tue, 3 May 2016 22:09:16 +0000 (22:09 +0000)]
Add a guard to ensure any needed argument is provided.
Roy Marples [Tue, 3 May 2016 20:25:30 +0000 (20:25 +0000)]
Fix a potential memory issue.
Roy Marples [Tue, 3 May 2016 16:21:20 +0000 (16:21 +0000)]
Fix reading long DHCPv6 leases.
Roy Marples [Tue, 3 May 2016 15:43:34 +0000 (15:43 +0000)]
Fix closing fd.
Roy Marples [Tue, 3 May 2016 15:26:18 +0000 (15:26 +0000)]
Tell Coverity that we do need to call initstate() for IPv4LL addresses.
Roy Marples [Tue, 3 May 2016 15:18:39 +0000 (15:18 +0000)]
Tell Coverity that we do need to call random() for IPv4LL addresses.
Roy Marples [Tue, 3 May 2016 15:06:22 +0000 (15:06 +0000)]
Use a local variable to indicate if we need to close the fd we may have
opened when reading leases.
Roy Marples [Tue, 3 May 2016 14:31:50 +0000 (14:31 +0000)]
Rework control_open to be cleaner for static analysis.
Roy Marples [Tue, 3 May 2016 14:17:37 +0000 (14:17 +0000)]
Remove useless range check.
Roy Marples [Tue, 3 May 2016 13:55:07 +0000 (13:55 +0000)]
Document some coverity false positives.
Roy Marples [Tue, 3 May 2016 12:34:34 +0000 (12:34 +0000)]
Fix a constant expression result.
Roy Marples [Tue, 3 May 2016 12:19:35 +0000 (12:19 +0000)]
Really fix the TOCTOU error.
Roy Marples [Tue, 3 May 2016 12:12:15 +0000 (12:12 +0000)]
Fix math.
Roy Marples [Tue, 3 May 2016 11:54:25 +0000 (11:54 +0000)]
Use reallocarray(3) to fix a pontential overflow issue discovered by Coverity.
Provide a shim based on our eloop one if not available in libc.
Roy Marples [Tue, 3 May 2016 11:20:47 +0000 (11:20 +0000)]
Fix a memory leak reported by Coverity.
Roy Marples [Tue, 3 May 2016 11:07:57 +0000 (11:07 +0000)]
control_open() should always return the fd to help static analysis.
Roy Marples [Tue, 3 May 2016 10:55:57 +0000 (10:55 +0000)]
Explain to Coverity why overrunning sockaddr_ll for IPoIB interfaces can happen and is catered for.
Roy Marples [Tue, 3 May 2016 10:25:42 +0000 (10:25 +0000)]
Fix a Coverity error by avoiding a memset with zero length.
Roy Marples [Tue, 3 May 2016 10:14:14 +0000 (10:14 +0000)]
Fix some issues reported by Converity.
Roy Marples [Tue, 3 May 2016 09:15:28 +0000 (09:15 +0000)]
Tell coverity that we don't care about this errors because they
are intentional.
Roy Marples [Mon, 2 May 2016 01:55:50 +0000 (01:55 +0000)]
Solaris does not return AF_LINK addresses in getifaddrs(3), so
link to dlpi, walk the interfaces and obtain the physical address
of each interface.
Roy Marples [Sun, 1 May 2016 14:51:10 +0000 (14:51 +0000)]
Fix compile on sunos again.
Roy Marples [Sun, 1 May 2016 14:46:31 +0000 (14:46 +0000)]
Fix a signed/unsigned comparison.
Roy Marples [Sun, 1 May 2016 14:39:45 +0000 (14:39 +0000)]
Test exit status of which, not just stdout.
Roy Marples [Sun, 1 May 2016 14:30:08 +0000 (14:30 +0000)]
Not all systems supply sys/cdefs.h and some require limits.h for PATH_MAX.
Roy Marples [Sun, 1 May 2016 14:20:21 +0000 (14:20 +0000)]
Prefix dhcp definition type with OT_
Roy Marples [Sat, 30 Apr 2016 07:30:40 +0000 (07:30 +0000)]
Move last last extending into it's own option so we can use the last lease
in a RFC compliant or incompliant way by choice.
Roy Marples [Fri, 29 Apr 2016 23:09:40 +0000 (23:09 +0000)]
Extending dhcp lease on expire should respect ARP being disabled.
Roy Marples [Fri, 29 Apr 2016 22:48:19 +0000 (22:48 +0000)]
When the leaselease option is given, retain the lease when the DHCP lease
expires, which mirrors how dhcpcd works when it starts up.
However, if any ARP probe is for the address, drop the lease right away
and continue discovery.
Roy Marples [Fri, 29 Apr 2016 22:42:48 +0000 (22:42 +0000)]
Allow arp_open to be called publically.
Roy Marples [Fri, 29 Apr 2016 22:41:51 +0000 (22:41 +0000)]
Keep the ARP state open on announce so we can detect duplicates.
Roy Marples [Fri, 29 Apr 2016 22:37:26 +0000 (22:37 +0000)]
Fix a potential access after free issue.
Roy Marples [Wed, 27 Apr 2016 22:19:16 +0000 (22:19 +0000)]
Describe multiple interfaces, master mode and single interfaces better.
Roy Marples [Wed, 27 Apr 2016 09:21:08 +0000 (09:21 +0000)]
Save BOOTP leases so they can be dumped.
Fixes [
9b7689a3a4 ].
Roy Marples [Tue, 26 Apr 2016 20:09:34 +0000 (20:09 +0000)]
Revert prior and just move the RUNDIR check above pidfile_lock.
Roy Marples [Tue, 26 Apr 2016 20:07:29 +0000 (20:07 +0000)]
Add a hack to ensure RUNDIR exists.
Roy Marples [Tue, 26 Apr 2016 19:28:58 +0000 (19:28 +0000)]
Ensure we use the correct rundir.
Roy Marples [Mon, 25 Apr 2016 19:00:55 +0000 (19:00 +0000)]
Linux does not change netmask/broadcast addresses when re-adding an address.
Roy Marples [Mon, 25 Apr 2016 16:23:37 +0000 (16:23 +0000)]
Update remembered addresses for netmask and broadcast addresss.
Roy Marples [Mon, 25 Apr 2016 16:23:10 +0000 (16:23 +0000)]
If a DHCP state is ARP probbed successfully and we're bound then don't do anything.
Roy Marples [Mon, 25 Apr 2016 13:15:56 +0000 (13:15 +0000)]
Report the broadcast address being added.
Roy Marples [Mon, 25 Apr 2016 13:03:52 +0000 (13:03 +0000)]
We can only check rtm_pid for the correct pid - other messages
do not have this sadly.
Roy Marples [Mon, 25 Apr 2016 13:03:24 +0000 (13:03 +0000)]
Ignore address removals if the broadcast address is the same as well as the
netmask address.
Roy Marples [Mon, 25 Apr 2016 11:53:33 +0000 (11:53 +0000)]
Fix compile.
Roy Marples [Mon, 25 Apr 2016 10:58:18 +0000 (10:58 +0000)]
dst becomes brd as it's makes more sense as we mainly deal with ethernet.
Ensure that handleifa is always passed brd.
If brd does not match existing broadcast address on an existing inet address,
delete it and add our new one.
Roy Marples [Mon, 25 Apr 2016 10:49:51 +0000 (10:49 +0000)]
Whitespace police.
Roy Marples [Sun, 24 Apr 2016 19:55:22 +0000 (19:55 +0000)]
CID
1358677 : (Negative returns) tuck in poll_fd assignment in eloop_open(), thanks to Christos.
Roy Marples [Sun, 24 Apr 2016 19:46:28 +0000 (19:46 +0000)]
CID
1358676 : Forward NULL.