]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
9 years agoAlways show the prefix we are delegated in debug, aids [c4df3c6b97].
Roy Marples [Wed, 8 Jun 2016 11:30:38 +0000 (11:30 +0000)] 
Always show the prefix we are delegated in debug, aids [c4df3c6b97].

9 years agoReserve enough space for a fully escaped SSID.
Roy Marples [Tue, 7 Jun 2016 19:09:39 +0000 (19:09 +0000)] 
Reserve enough space for a fully escaped SSID.

9 years agoAllow an SLA 0 and prefix length of 0 to delegate the whole prefix which
Roy Marples [Wed, 1 Jun 2016 06:21:04 +0000 (06:21 +0000)] 
Allow an SLA 0 and prefix length of 0 to delegate the whole prefix which
allows the following config:
ia_pd 1 wm1/0

9 years agoAdd lastlease informational message.
Roy Marples [Wed, 1 Jun 2016 05:44:47 +0000 (05:44 +0000)] 
Add lastlease informational message.

9 years agoWe can work with saved leases without a full vendor area.
Roy Marples [Wed, 1 Jun 2016 05:44:22 +0000 (05:44 +0000)] 
We can work with saved leases without a full vendor area.

9 years agoDon't drop DHCPv6 if we have a delegated address on router expiry.
Roy Marples [Thu, 26 May 2016 08:54:45 +0000 (08:54 +0000)] 
Don't drop DHCPv6 if we have a delegated address on router expiry.

9 years agoRemove debug
Roy Marples [Wed, 25 May 2016 19:58:00 +0000 (19:58 +0000)] 
Remove debug

9 years agoReport the first non requested address.
Roy Marples [Wed, 25 May 2016 19:54:07 +0000 (19:54 +0000)] 
Report the first non requested address.

9 years agoEnsure mask and bcast as always set.
Roy Marples [Wed, 25 May 2016 13:50:05 +0000 (13:50 +0000)] 
Ensure mask and bcast as always set.

9 years agoCalc requested netmask at start rather than in get_lease.
Roy Marples [Wed, 25 May 2016 10:35:52 +0000 (10:35 +0000)] 
Calc requested netmask at start rather than in get_lease.
If we didn't request a specific address, use the existing address
netmask and broadcast addresses rather than any given by DHCP.

9 years agoFix some routing issues for POINTOPOINT interfaces.
Roy Marples [Wed, 25 May 2016 10:32:39 +0000 (10:32 +0000)] 
Fix some routing issues for POINTOPOINT interfaces.

9 years agoDisable ARP for POINTOPOINT.
Roy Marples [Wed, 25 May 2016 09:38:51 +0000 (09:38 +0000)] 
Disable ARP for POINTOPOINT.

9 years agoWe need to store INADDR_ANY addresses for Solaris.
Roy Marples [Tue, 24 May 2016 13:02:31 +0000 (13:02 +0000)] 
We need to store INADDR_ANY addresses for Solaris.

9 years agoConstity and void
Roy Marples [Mon, 23 May 2016 20:08:57 +0000 (20:08 +0000)] 
Constity and void

9 years agoRestore setting of secs.
Roy Marples [Mon, 23 May 2016 19:32:18 +0000 (19:32 +0000)] 
Restore setting of secs.

9 years agoTest for hostname_fqdn being set to server (new preferred value) or blank
Roy Marples [Mon, 23 May 2016 19:27:30 +0000 (19:27 +0000)] 
Test for hostname_fqdn being set to server (new preferred value) or blank
(old value). Thanks to Paul Walrath.

9 years agoDon't create blank dns entries, thanks to Jacques.
Roy Marples [Mon, 23 May 2016 19:17:14 +0000 (19:17 +0000)] 
Don't create blank dns entries, thanks to Jacques.

9 years agoConstify and fix alignment.
Roy Marples [Mon, 23 May 2016 15:41:48 +0000 (15:41 +0000)] 
Constify and fix alignment.

9 years agoAdd support for parsing route messages on Solaris - similar to BSD.
Roy Marples [Fri, 20 May 2016 16:00:33 +0000 (16:00 +0000)] 
Add support for parsing route messages on Solaris - similar to BSD.

9 years agowhitespace police.
Roy Marples [Fri, 20 May 2016 15:57:49 +0000 (15:57 +0000)] 
whitespace police.

9 years agoUse more void.
Roy Marples [Thu, 19 May 2016 21:12:26 +0000 (21:12 +0000)] 
Use more void.

9 years agoFix adding static address masks.
Roy Marples [Thu, 19 May 2016 20:50:15 +0000 (20:50 +0000)] 
Fix adding static address masks.

9 years agoFix compile
Roy Marples [Thu, 19 May 2016 20:29:24 +0000 (20:29 +0000)] 
Fix compile

9 years agoSpit handlelink into smaller functions to increase read-ability.
Roy Marples [Thu, 19 May 2016 20:27:07 +0000 (20:27 +0000)] 
Spit handlelink into smaller functions to increase read-ability.

9 years agoSpecify AF_UNPSEC
Roy Marples [Thu, 19 May 2016 15:32:20 +0000 (15:32 +0000)] 
Specify AF_UNPSEC

9 years agoFix compile.
Roy Marples [Thu, 19 May 2016 15:21:14 +0000 (15:21 +0000)] 
Fix compile.

9 years agoProvide a better getifaddrs(3).
Roy Marples [Thu, 19 May 2016 15:10:26 +0000 (15:10 +0000)] 
Provide a better getifaddrs(3).

9 years agoFix a compile issue adding loopback routes.
Roy Marples [Thu, 19 May 2016 15:07:52 +0000 (15:07 +0000)] 
Fix a compile issue adding loopback routes.

9 years agomanagelink -> hanlelink
Roy Marples [Thu, 19 May 2016 15:01:47 +0000 (15:01 +0000)] 
managelink -> hanlelink

9 years agoUse named initialiser.
Roy Marples [Thu, 19 May 2016 12:56:06 +0000 (12:56 +0000)] 
Use named initialiser.

9 years agoGrab the state before freeing the address.
Roy Marples [Thu, 19 May 2016 09:15:46 +0000 (09:15 +0000)] 
Grab the state before freeing the address.

9 years agoFix compile on NetBSD.
Roy Marples [Thu, 19 May 2016 08:38:13 +0000 (08:38 +0000)] 
Fix compile on NetBSD.

9 years agoFix compile
Roy Marples [Wed, 18 May 2016 19:41:19 +0000 (19:41 +0000)] 
Fix compile

9 years agoFix requesting a lease witout an existing address.
Roy Marples [Wed, 18 May 2016 16:40:28 +0000 (16:40 +0000)] 
Fix requesting a lease witout an existing address.

9 years agoFix compile
Roy Marples [Wed, 18 May 2016 16:27:39 +0000 (16:27 +0000)] 
Fix compile

9 years agoRework if_address to just use an ipv4_addr structure, similar to how
Roy Marples [Wed, 18 May 2016 16:23:28 +0000 (16:23 +0000)] 
Rework if_address to just use an ipv4_addr structure, similar to how
if_address6 works.
Use a pointer to the ipv4_addr for the address we added for dhcp and ipv4ll
states.
This is quite some churn throughout the IPv4 stack, but makes the
binary smaller (at least on Linux/amd64).
It will be needed to support adding addresses on Solaris.

9 years agomask is more descriptive than net. Churn.
Roy Marples [Tue, 17 May 2016 21:13:49 +0000 (21:13 +0000)] 
mask is more descriptive than net. Churn.

9 years agoSet correct netmask for INFORM as requested.
Roy Marples [Tue, 17 May 2016 20:53:42 +0000 (20:53 +0000)] 
Set correct netmask for INFORM as requested.
Ignore netmask and broadcast addresses when INFORMing.

9 years agoUse DLPI to send and receive ARP and BOOTP packets.
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.

9 years agoOnly accept BOOTREPLY.
Roy Marples [Mon, 16 May 2016 15:43:23 +0000 (15:43 +0000)] 
Only accept BOOTREPLY.

9 years agoMore DHCP -> BOOTP.
Roy Marples [Mon, 16 May 2016 15:19:28 +0000 (15:19 +0000)] 
More DHCP -> BOOTP.

9 years agodhcp_bpf_filter -> bootp_bpf_filter (and DHCP -> BOOTP for ports).
Roy Marples [Sat, 14 May 2016 16:35:23 +0000 (16:35 +0000)] 
dhcp_bpf_filter -> bootp_bpf_filter (and DHCP -> BOOTP for ports).

9 years agoNo point in looping on the raw socket anymore thanks to eloop.
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.

9 years agoUse UNCONST
Roy Marples [Sat, 14 May 2016 10:38:15 +0000 (10:38 +0000)] 
Use UNCONST

9 years agoGive some context to if_closeraw
Roy Marples [Fri, 13 May 2016 15:53:57 +0000 (15:53 +0000)] 
Give some context to if_closeraw

9 years agoRework the raw packet API so we work directly with a fd.
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.

9 years agowhitespace
Roy Marples [Fri, 13 May 2016 13:59:24 +0000 (13:59 +0000)] 
whitespace

9 years agoImprove memory allocation parsing routes and provide a better
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.

9 years agolo0 doesn't appear in dlpi_walk, so create an empty AF_LINK for it.
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.

9 years agoIf we don't have a broadcast address, set zero on assignment.
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.

9 years agoLearn about routing tables on Solaris.
Roy Marples [Thu, 12 May 2016 16:51:36 +0000 (16:51 +0000)] 
Learn about routing tables on Solaris.

9 years agoinitrt should really take dhcpcd_ctx as an argument.
Roy Marples [Thu, 12 May 2016 10:45:21 +0000 (10:45 +0000)] 
initrt should really take dhcpcd_ctx as an argument.

9 years agoHandle truncated DHCP messages, provided only the BOOTP vendor area is
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].

9 years agoAvoid a "conversion to '__uint16_t' from 'int' may alter its value"
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.

9 years agoNote dhcpcd -v in options, fixes [46237d7e79].
Roy Marples [Mon, 9 May 2016 10:41:59 +0000 (10:41 +0000)] 
Note dhcpcd -v in options, fixes [46237d7e79].

9 years agoRelease dhcpcd-6.11.0 v6.11.0
Roy Marples [Mon, 9 May 2016 09:35:34 +0000 (09:35 +0000)] 
Release dhcpcd-6.11.0

9 years agoPreserve lo0 routes if the global default is to persist.
Roy Marples [Mon, 9 May 2016 08:22:38 +0000 (08:22 +0000)] 
Preserve lo0 routes if the global default is to persist.

9 years agoFix deleting the reject route on Linux, [efc359da01].
Roy Marples [Sun, 8 May 2016 15:44:12 +0000 (15:44 +0000)] 
Fix deleting the reject route on Linux, [efc359da01].

9 years agoNo need for ;
Roy Marples [Sun, 8 May 2016 10:18:49 +0000 (10:18 +0000)] 
No need for ;

9 years agoWhitespace.
Roy Marples [Sat, 7 May 2016 21:27:34 +0000 (21:27 +0000)] 
Whitespace.

9 years agoFix option concatenation.
Roy Marples [Sat, 7 May 2016 21:25:02 +0000 (21:25 +0000)] 
Fix option concatenation.

9 years agoWhen removing delegated addresses, ensure the reject route is restored.
Roy Marples [Sat, 7 May 2016 20:40:40 +0000 (20:40 +0000)] 
When removing delegated addresses, ensure the reject route is restored.

9 years agoWhite space.
Roy Marples [Sat, 7 May 2016 19:58:11 +0000 (19:58 +0000)] 
White space.

9 years agoDon't realloc delegated prefixes needlessly.
Roy Marples [Sat, 7 May 2016 19:55:48 +0000 (19:55 +0000)] 
Don't realloc delegated prefixes needlessly.

9 years agoRevert prior
Roy Marples [Sat, 7 May 2016 19:53:54 +0000 (19:53 +0000)] 
Revert prior

9 years agoRemember the delegating prefix rather than the delegating interface.
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.

9 years agoAlways set HAVE_REALLOCARRAY so that eloop can use it.
Roy Marples [Sat, 7 May 2016 12:20:36 +0000 (12:20 +0000)] 
Always set HAVE_REALLOCARRAY so that eloop can use it.

9 years agoUse libc reallocarray in eloop if we have it.
Roy Marples [Fri, 6 May 2016 20:51:37 +0000 (20:51 +0000)] 
Use libc reallocarray in eloop if we have it.

9 years agoCheck we actually have options allocated before adding commandline options.
Roy Marples [Fri, 6 May 2016 20:44:24 +0000 (20:44 +0000)] 
Check we actually have options allocated before adding commandline options.

9 years agoFix a bogus clang analyzer warning on BSD by moving an assignment slightly higher up.
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.

9 years agoDon't install a reject route if the prefix is the same as the delegation, [efc359da01].
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].

9 years agoNo need to check if the passed pointer is valid.
Roy Marples [Fri, 6 May 2016 18:15:41 +0000 (18:15 +0000)] 
No need to check if the passed pointer is valid.

9 years agoFix some memory issues.
Roy Marples [Fri, 6 May 2016 16:28:54 +0000 (16:28 +0000)] 
Fix some memory issues.

9 years agoFree the getline buffer if needed.
Roy Marples [Fri, 6 May 2016 16:23:26 +0000 (16:23 +0000)] 
Free the getline buffer if needed.

9 years agoMove duid and ipv6 secret file reading code into a common function.
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.

9 years agoMove packet buffer from dhcpcd context to a generic stack variable based on MTU_MAX.
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.

9 years agoDHCP messages are really BOOTP so lets name the structure accordingly.
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.

9 years agoMove dhcp6's read lease code into dhcp-common.
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.

9 years agoCheck a calloc failure.
Roy Marples [Fri, 6 May 2016 12:51:01 +0000 (12:51 +0000)] 
Check a calloc failure.

9 years agoFix comment.
Roy Marples [Wed, 4 May 2016 13:07:10 +0000 (13:07 +0000)] 
Fix comment.

9 years agoRemove random() from a potential htonl() macro which could call it more than once.
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.

9 years agoRead from BPF into a void pointer aliased to the buffer so that
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.

9 years agoFix returning a pid if open fails.
Roy Marples [Wed, 4 May 2016 12:32:29 +0000 (12:32 +0000)] 
Fix returning a pid if open fails.

9 years agoFix compile.
Roy Marples [Wed, 4 May 2016 11:51:44 +0000 (11:51 +0000)] 
Fix compile.

9 years agoCheck for NULL.
Roy Marples [Wed, 4 May 2016 11:48:51 +0000 (11:48 +0000)] 
Check for NULL.

9 years agoFix reallocarray test
Roy Marples [Wed, 4 May 2016 11:39:37 +0000 (11:39 +0000)] 
Fix reallocarray test

9 years agoOptimize code to find a route interface.
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.

9 years agoUse void * to read the DHCP lease file as that seems to pass the Coverity
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.

9 years agoUse a union to read an old lease.
Roy Marples [Tue, 3 May 2016 23:19:57 +0000 (23:19 +0000)] 
Use a union to read an old lease.

9 years agoApply a bit more security around parsing DHCP.
Roy Marples [Tue, 3 May 2016 22:50:53 +0000 (22:50 +0000)] 
Apply a bit more security around parsing DHCP.

9 years agoAdd a guard to ensure any needed argument is provided.
Roy Marples [Tue, 3 May 2016 22:09:16 +0000 (22:09 +0000)] 
Add a guard to ensure any needed argument is provided.

9 years agoFix a potential memory issue.
Roy Marples [Tue, 3 May 2016 20:25:30 +0000 (20:25 +0000)] 
Fix a potential memory issue.

9 years agoFix reading long DHCPv6 leases.
Roy Marples [Tue, 3 May 2016 16:21:20 +0000 (16:21 +0000)] 
Fix reading long DHCPv6 leases.

9 years agoFix closing fd.
Roy Marples [Tue, 3 May 2016 15:43:34 +0000 (15:43 +0000)] 
Fix closing fd.

9 years agoTell Coverity that we do need to call initstate() for IPv4LL addresses.
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.

9 years agoTell Coverity that we do need to call random() 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.

9 years agoUse a local variable to indicate if we need to close the fd we may have
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.

9 years agoRework control_open to be cleaner for static analysis.
Roy Marples [Tue, 3 May 2016 14:31:50 +0000 (14:31 +0000)] 
Rework control_open to be cleaner for static analysis.

9 years agoRemove useless range check.
Roy Marples [Tue, 3 May 2016 14:17:37 +0000 (14:17 +0000)] 
Remove useless range check.

9 years agoDocument some coverity false positives.
Roy Marples [Tue, 3 May 2016 13:55:07 +0000 (13:55 +0000)] 
Document some coverity false positives.