]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
8 years agoipv6nd: don't handle NA or RA if not active interface
Roy Marples [Wed, 25 Oct 2017 10:45:25 +0000 (11:45 +0100)] 
ipv6nd: don't handle NA or RA if not active interface

This stops interfaces activated only for delegating to from
receiving these messages by default.

8 years agobpf: remove the BPF_FREE flag
Roy Marples [Wed, 25 Oct 2017 08:15:10 +0000 (09:15 +0100)] 
bpf: remove the BPF_FREE flag

ARP code can just try and free the istate if no astates left
after finishing the read loop.

8 years agoarp: fix memory leak
Roy Marples [Tue, 24 Oct 2017 23:23:29 +0000 (00:23 +0100)] 
arp: fix memory leak

Prior patch introduced a memory leak if a new ARP state was
added after BPF_FREE was set. Cater for this.

8 years agoFix prior patches by using correct bitmasks for flags.
Roy Marples [Tue, 24 Oct 2017 23:04:44 +0000 (00:04 +0100)] 
Fix prior patches by using correct bitmasks for flags.
Add BPF_READING and BPF_FREE so that arp can free the state
after finishing the read loop.

8 years agoFix a boo boo
Roy Marples [Tue, 24 Oct 2017 22:33:27 +0000 (23:33 +0100)] 
Fix a boo boo

8 years agobpf: store flags in state for a better abort
Roy Marples [Tue, 24 Oct 2017 22:11:15 +0000 (23:11 +0100)] 
bpf: store flags in state for a better abort

There are cases when dhcp may close and open an ARP socket
during an ARP read. This means the fd will not be -1, so we need
to set BPF_EOF when closing the socket.

8 years agodhcp: arp announce existing address before reboot
Roy Marples [Mon, 23 Oct 2017 23:13:09 +0000 (00:13 +0100)] 
dhcp: arp announce existing address before reboot

This updates upstream ARP tables to send their ACK to the
interface we want to receive the message on and not one
which is not in use but has the same IP address.

Doing this means we no longer need to open DHCP sockets for
interfaces we're not interested in.

8 years agodhcp: improve error logging about UDP checksum failure
Roy Marples [Mon, 23 Oct 2017 09:55:28 +0000 (10:55 +0100)] 
dhcp: improve error logging about UDP checksum failure

8 years agoMake this more readable.
Roy Marples [Sat, 21 Oct 2017 13:10:02 +0000 (14:10 +0100)] 
Make this more readable.

8 years agoOpenBSD: Remove route labelling support
Roy Marples [Tue, 10 Oct 2017 20:51:55 +0000 (21:51 +0100)] 
OpenBSD: Remove route labelling support

It was only added because OpenBSD dhclient did similar .... that
was removed so dhcpcd is following suit.

8 years agoDon't attempt to flush IPv6 routers or prefixes if the kernel
Roy Marples [Tue, 10 Oct 2017 20:04:27 +0000 (21:04 +0100)] 
Don't attempt to flush IPv6 routers or prefixes if the kernel
does not support setting them.

8 years agoDon't mark statically configured IPv4 routes as DHCP.
Roy Marples [Mon, 9 Oct 2017 19:21:05 +0000 (20:21 +0100)] 
Don't mark statically configured IPv4 routes as DHCP.

8 years agoSet DHCP routes as DHCP in supported OS's.
Roy Marples [Mon, 9 Oct 2017 19:11:36 +0000 (20:11 +0100)] 
Set DHCP routes as DHCP in supported OS's.

8 years agoSet RA routes as RA in supported OS's.
Roy Marples [Mon, 9 Oct 2017 18:57:09 +0000 (19:57 +0100)] 
Set RA routes as RA in supported OS's.

8 years agoUpdate README from dhcpcd.conf
Roy Marples [Mon, 9 Oct 2017 09:28:03 +0000 (10:28 +0100)] 
Update README from dhcpcd.conf

8 years agoRelease dhcpcd-7.0.0-rc3 v7.0.0-rc3
Roy Marples [Sat, 7 Oct 2017 13:47:11 +0000 (14:47 +0100)] 
Release dhcpcd-7.0.0-rc3

8 years agoState it's a SLAAC address
Roy Marples [Sat, 7 Oct 2017 12:48:41 +0000 (13:48 +0100)] 
State it's a SLAAC address

8 years agoDocument that -r and -s require the address on the command line.
Roy Marples [Sat, 7 Oct 2017 12:36:24 +0000 (13:36 +0100)] 
Document that -r and -s require the address on the command line.
They are still optional in dhcpcd.conf.

8 years agoDocument slaac hwaddr in the default dhcpcd.conf
Roy Marples [Sat, 7 Oct 2017 12:33:00 +0000 (13:33 +0100)] 
Document slaac hwaddr in the default dhcpcd.conf

8 years agoDon't re-define what crypt sources we need.
Roy Marples [Thu, 5 Oct 2017 13:03:35 +0000 (14:03 +0100)] 
Don't re-define what crypt sources we need.

8 years agoFix compile on Illumos.
Roy Marples [Thu, 5 Oct 2017 13:53:11 +0000 (14:53 +0100)] 
Fix compile on Illumos.

8 years agoSupply __arraycount if not present.
Roy Marples [Thu, 5 Oct 2017 13:34:05 +0000 (14:34 +0100)] 
Supply __arraycount if not present.

8 years agoFix prior on stricter shells.
Roy Marples [Thu, 5 Oct 2017 13:33:48 +0000 (14:33 +0100)] 
Fix prior on stricter shells.

8 years agoDetect hmac(3) in libc or the library containing MD5.
Roy Marples [Thu, 5 Oct 2017 13:13:02 +0000 (14:13 +0100)] 
Detect hmac(3) in libc or the library containing MD5.
If not found, a compat function is provided, taken from NetBSD.

8 years agoWe don't actually care about the number of added routes, just
Roy Marples [Thu, 5 Oct 2017 07:05:08 +0000 (08:05 +0100)] 
We don't actually care about the number of added routes, just
it we failed or not.
So just return 0 on success and -1 on failure to work around
a gcc check where signed int could overflow.
This should be impossible anyway due to the protocol limits of
DHCP and RA.

8 years agoFree any allocated routes if we failed to allocate some.
Roy Marples [Thu, 5 Oct 2017 06:35:16 +0000 (07:35 +0100)] 
Free any allocated routes if we failed to allocate some.

8 years agoAdd compat/strlcpy.c from OpenBSD libc to use instead of
Roy Marples [Wed, 4 Oct 2017 15:07:49 +0000 (16:07 +0100)] 
Add compat/strlcpy.c from OpenBSD libc to use instead of
defining strlcpy to snprintf.
This makes dhcpcd smaller on platforms lacking strlcpy(3).

8 years agoComment out IPoIB broadcast address with a comment.
Roy Marples [Tue, 3 Oct 2017 23:11:14 +0000 (00:11 +0100)] 
Comment out IPoIB broadcast address with a comment.

8 years agoSpecify MD5_BLOCK_LENGTH as ULL to try and work around a compiler issue.
Roy Marples [Tue, 3 Oct 2017 22:51:17 +0000 (23:51 +0100)] 
Specify MD5_BLOCK_LENGTH as ULL to try and work around a compiler issue.

8 years agoCompare tv_sec to uint32_t correctly.
Roy Marples [Tue, 3 Oct 2017 22:40:50 +0000 (23:40 +0100)] 
Compare tv_sec to uint32_t correctly.

8 years agoCompile eloop with config.h by default and bring in compat modules.
Roy Marples [Tue, 3 Oct 2017 14:50:27 +0000 (15:50 +0100)] 
Compile eloop with config.h by default and bring in compat modules.
This allows us to build this test AND dhcpcd exactly the same,
which is important as they build eloop.o in the same place.

8 years agoDon't special case not deleteing the IPv6 default route.
Roy Marples [Tue, 3 Oct 2017 11:00:52 +0000 (12:00 +0100)] 
Don't special case not deleteing the IPv6 default route.
dhcpcd now manages this the same as any other route as dhcpcd is
either in charge of IPv6 or it's not.

8 years agoFix checking gateways in route comparison.
Roy Marples [Tue, 3 Oct 2017 10:44:39 +0000 (11:44 +0100)] 
Fix checking gateways in route comparison.

8 years agoEnsure that all RA's are actually dropped when dropping an interface.
Roy Marples [Tue, 3 Oct 2017 10:38:39 +0000 (11:38 +0100)] 
Ensure that all RA's are actually dropped when dropping an interface.

8 years agoipv6nd_freedrop is no longer public.
Roy Marples [Tue, 3 Oct 2017 10:17:21 +0000 (11:17 +0100)] 
ipv6nd_freedrop is no longer public.

8 years agoRelease dhcpcd-7.0.0-rc2 v7.0.0-rc2
Roy Marples [Tue, 19 Sep 2017 18:57:15 +0000 (19:57 +0100)] 
Release dhcpcd-7.0.0-rc2

8 years agodhcp: don't log wrong xid when there is no state
Roy Marples [Mon, 18 Sep 2017 09:07:24 +0000 (10:07 +0100)] 
dhcp: don't log wrong xid when there is no state

8 years agoAdd a FALLTHROUGH comment to appease coverity.
Roy Marples [Fri, 15 Sep 2017 19:32:12 +0000 (20:32 +0100)] 
Add a FALLTHROUGH comment to appease coverity.

8 years agoFix compile warning with ARP disabled.
Roy Marples [Fri, 15 Sep 2017 15:59:20 +0000 (16:59 +0100)] 
Fix compile warning with ARP disabled.

8 years agoarp: RFC5227 kernels need to send ARP too
Roy Marples [Fri, 15 Sep 2017 11:56:09 +0000 (12:56 +0100)] 
arp: RFC5227 kernels need to send ARP too

Now that IP address sharing is handled with ARP announcements.
This fixes the issue where RFC5227 kernels would fail to compile
if not compiled for ARPING as well.

8 years agoUse braces to clarify.
Roy Marples [Thu, 14 Sep 2017 11:59:31 +0000 (12:59 +0100)] 
Use braces to clarify.

8 years agoWhitespace.
Roy Marples [Wed, 13 Sep 2017 17:23:15 +0000 (18:23 +0100)] 
Whitespace.

8 years agoUpdate spelling in comments.
Roy Marples [Tue, 12 Sep 2017 11:22:28 +0000 (12:22 +0100)] 
Update spelling in comments.
Fixes T137.

8 years agoRevert e92e049e as Linux marks autoconf addresses as manage
Roy Marples [Tue, 12 Sep 2017 10:35:01 +0000 (11:35 +0100)] 
Revert e92e049e as Linux marks autoconf addresses as manage
temporary addresses from this address.

8 years agoFix prefix delegation.
Roy Marples [Fri, 8 Sep 2017 19:19:02 +0000 (20:19 +0100)] 
Fix prefix delegation.

Reviewers: smlx

Reviewed By: smlx

Subscribers: smlx

Differential Revision: https://dev.marples.name/D128

8 years agodhcp6: listen to each DHCP address for messages
Roy Marples [Mon, 28 Aug 2017 22:43:19 +0000 (23:43 +0100)] 
dhcp6: listen to each DHCP address for messages

Summary:
This allows dhcpcd to receive unicast DHCPv6 messages to non LL
addresses in non master mode.

Fixes T123.

Test Plan:
  * Setup your DHCPv6 server to send the unicast option
  * Start dhcpcd for a specific interface
  * Watch it ask for confirmation and receive replies to messages

Maniphest Tasks: T123

Differential Revision: https://dev.marples.name/D127

8 years agoA delegated prefix is not an address to be added.
Roy Marples [Thu, 7 Sep 2017 10:13:57 +0000 (11:13 +0100)] 
A delegated prefix is not an address to be added.

8 years agoIgnore swap files.
Roy Marples [Tue, 5 Sep 2017 18:40:40 +0000 (19:40 +0100)] 
Ignore swap files.

8 years agoRemove debug.
Roy Marples [Tue, 5 Sep 2017 18:29:02 +0000 (19:29 +0100)] 
Remove debug.

8 years agoFix reporting of DNS encoded SIP servers.
Roy Marples [Wed, 30 Aug 2017 12:44:36 +0000 (13:44 +0100)] 
Fix reporting of DNS encoded SIP servers.

8 years agoman: note requirements of interface / protocol when exiting
Roy Marples [Tue, 29 Aug 2017 09:37:24 +0000 (10:37 +0100)] 
man: note requirements of interface / protocol when exiting

8 years agoPromote IPv6 dhcpcd address flags to unsignned int to allow expansion.
Roy Marples [Mon, 28 Aug 2017 19:05:54 +0000 (20:05 +0100)] 
Promote IPv6 dhcpcd address flags to unsignned int to allow expansion.

8 years agoDon't create temporary addresses based off prefix in newaddr.
Roy Marples [Sat, 26 Aug 2017 14:08:04 +0000 (15:08 +0100)] 
Don't create temporary addresses based off prefix in newaddr.

8 years agoEnsure that IN6_IFF_TEMPORARY is defined before checking it on Linux.
Roy Marples [Sat, 26 Aug 2017 14:06:39 +0000 (15:06 +0100)] 
Ensure that IN6_IFF_TEMPORARY is defined before checking it on Linux.

8 years agoFix compile without INET.
Roy Marples [Sat, 12 Aug 2017 08:18:50 +0000 (09:18 +0100)] 
Fix compile without INET.

8 years agoFix compile without INET6.
Roy Marples [Sat, 12 Aug 2017 08:17:23 +0000 (09:17 +0100)] 
Fix compile without INET6.

8 years agoif-bsd: compile on recent OpenBSD without ND6 flags
Roy Marples [Thu, 10 Aug 2017 12:20:47 +0000 (13:20 +0100)] 
if-bsd: compile on recent OpenBSD without ND6 flags

Add a #ifdef tests to check if any flags are settable and if not,
compile the flags out.
Fixes T132.

8 years agoCast away some compile warnings.
Roy Marples [Fri, 4 Aug 2017 19:17:37 +0000 (20:17 +0100)] 
Cast away some compile warnings.

8 years agoMore ap -> ia
Roy Marples [Fri, 4 Aug 2017 18:59:03 +0000 (19:59 +0100)] 
More ap -> ia

8 years agoWe don't send NS messages anymore.
Roy Marples [Thu, 3 Aug 2017 19:24:42 +0000 (20:24 +0100)] 
We don't send NS messages anymore.

8 years agoFix a memory issue.
Roy Marples [Thu, 3 Aug 2017 19:22:19 +0000 (20:22 +0100)] 
Fix a memory issue.

8 years agoPersist shared IP address on interfaces.
Roy Marples [Tue, 25 Jul 2017 10:43:12 +0000 (11:43 +0100)] 
Persist shared IP address on interfaces.

Summary:
Send unicast DHCP messages by BPF rather than a UDP socket.
Open a BPF socket for all interfaces whether active or not.
Redirect packets to the correct interface based on xid and chaddr.
Announce the primary address via ARP when any address is added or deleted.
Remove the now redundant prefer another address code.

Fixes T126.

Test Plan:
Setup your DHCP server to assign the same address to many interfaces
on the same host.
On the host, start dhcpcd and bring up/down/activate the interfaces
in a random order.
Pinging another host on the network should be possible at all times
if any interface is up.

Maniphest Tasks: T126

Differential Revision: https://dev.marples.name/D122

8 years agodhcp6: implement lastlease and lastleaseextend
Roy Marples [Tue, 25 Jul 2017 10:00:44 +0000 (11:00 +0100)] 
dhcp6: implement lastlease and lastleaseextend

Summary:
This has resulted in a fair churn of code, but in summary:
  *  TIMEDOUT state introduced
  *  lease binding split out from handledata
  *  generic fail function introduced to attempt rebind
     of lastlease
  *  extended addresses are remembered and purged when a
     lease is re-negotiated
  *  defaults of 0 are no longer hard coded for most timers

Fixes T128.

Test Plan:
Obtain a dhcp6 lease, kill dhcpcd and the dhcp6 server.
run with `--lastlease` and check it's applied correctly.
Also, observe timers to ensure it renews, rebinds and expires.
Do same, but now with `--lastleaseextend as well`.
Observe same timers, but it should not expire but become an
infinite lease until a new one appears.

Reviewers: shahid

Reviewed By: shahid

Maniphest Tasks: T128

Differential Revision: https://dev.marples.name/D125

8 years agodhcpcd starts inactive interfaces erroneously.
Roy Marples [Tue, 25 Jul 2017 09:14:06 +0000 (10:14 +0100)] 
dhcpcd starts inactive interfaces erroneously.

Summary: If ifp->active is not IF_ACTIVE_USER only find DHCPv6 delegations for the interface on carrier up.

Test Plan:
Allow DHCP on all interfaces, but set one interface in denyinterfaces.
Assign this interface a delegation from another interface.
This interface should not start DHCP.

Differential Revision: https://dev.marples.name/D120

8 years agoUnset $ifsuffix for non protocol reasons
Roy Marples [Thu, 6 Jul 2017 16:13:51 +0000 (17:13 +0100)] 
Unset $ifsuffix for non protocol reasons

Summary:
The default was to assume unspecified reasons were DHCP.
This is bad for non protocol events such as NOCARRIER which could
cause a dhcpcd instance running IPv6 only to wipe out the DNS
records created by a separate dhcpcd instance handling IPv4.

Fixes T129.

Test Plan:
Start `dhcpcd -4 -K eth0`.
Observe that a resolvconf entry is created for eth0.dhcp.
Start `dhcpcd -6 eth0`.
Observe that a resolvconf entry is created for eth0.dhcp6.
Bring the carrier down for eth0.
Because the -4 instance is ignoring carrier, it is expected that
the eth0.dhcp resolvconf entry is preserved.

Maniphest Tasks: T129

Differential Revision: https://dev.marples.name/D124

8 years agoFix sefault when address lifetime overflows
Roy Marples [Thu, 13 Jul 2017 13:05:57 +0000 (14:05 +0100)] 
Fix sefault when address lifetime overflows

Simplify by remembering the address's interface after interface
enumeration.
While here, rename ap to ia some more.

8 years agodhcp: return routes when renewing
Roy Marples [Thu, 18 May 2017 13:54:16 +0000 (14:54 +0100)] 
dhcp: return routes when renewing

Summary:
If we only return our routes in the BOUND state, our working
routes could be deleted if we're in the RENEWING state and another
interface applies it's routes.

Fixes T118.

Test Plan:
start dhcpcd on two interfaces and ensure both get a lease
kill the DHCP server an one interface and wait for renewal.
when one interface renews, no routes should be deleted.

Reviewers: werebear77

Subscribers: werebear77

Maniphest Tasks: T118

Differential Revision: https://dev.marples.name/D113

8 years agoTreat INFORMED as a released state so it's dropped by the hooks
Roy Marples [Thu, 6 Jul 2017 16:25:40 +0000 (17:25 +0100)] 
Treat INFORMED as a released state so it's dropped by the hooks

8 years agoUpdate to the real stock dhcpcd.conf
Roy Marples [Tue, 4 Jul 2017 15:05:36 +0000 (16:05 +0100)] 
Update to the real stock dhcpcd.conf

8 years agoFix processing of INFORM6 replies without an OK status code.
Roy Marples [Tue, 4 Jul 2017 14:29:58 +0000 (15:29 +0100)] 
Fix processing of INFORM6 replies without an OK status code.

While where, ensure that failure to malloc a buffer to print
the status message returns -1 rather than false to indicate an
error.

8 years agoWhitespace
Roy Marples [Tue, 4 Jul 2017 13:39:09 +0000 (14:39 +0100)] 
Whitespace

8 years agoAlways set the outgoing interface when creating non reject routes on BSD.
Roy Marples [Tue, 4 Jul 2017 13:36:01 +0000 (14:36 +0100)] 
Always set the outgoing interface when creating non reject routes on BSD.

8 years agoOnly start discovery on lease expiration if we have a carrier.
Roy Marples [Tue, 4 Jul 2017 11:22:56 +0000 (12:22 +0100)] 
Only start discovery on lease expiration if we have a carrier.

8 years agoAdd a return value to deleteing events and timers so we know
Roy Marples [Mon, 3 Jul 2017 20:35:39 +0000 (21:35 +0100)] 
Add a return value to deleteing events and timers so we know
if something was really affected.

8 years agoFix a valgrind error.
Roy Marples [Sat, 1 Jul 2017 10:56:33 +0000 (11:56 +0100)] 
Fix a valgrind error.

8 years agoFix a runtime shift error.
Maya Rashish [Fri, 30 Jun 2017 15:51:49 +0000 (16:51 +0100)] 
Fix a runtime shift error.

8 years agoFix crash when creating routes for a non preferred lease.
Roy Marples [Sat, 24 Jun 2017 16:36:12 +0000 (17:36 +0100)] 
Fix crash when creating routes for a non preferred lease.

Summary:
When dhcpcd shares the same IP address across interfaces, the
non preferred leases have the address deleted but remain in
the BOUND state.
We need to check that the address has been added, otherwise
we crash when building some routes.

Thanks to Jason A. Donenfeld <Jason@zx2c4.com> for the report.

Test Plan:
Ensure the lowest metric interface is denied in denyinterfaces.
Setup your DHCP server to share the same IP addres to all the host interfaces.
Start dhcpcd.
Activate the denied interface via `dhcpcd -n $interface`.
dhcpcd should not crash when binding the routes.

Tags: #dhcpcd

Differential Revision: https://dev.marples.name/D121

8 years agoNow print_option is fully checked, we can avoid a malloc here now.
Roy Marples [Fri, 16 Jun 2017 09:20:15 +0000 (10:20 +0100)] 
Now print_option is fully checked, we can avoid a malloc here now.

8 years agoCheck return values of snprintf and print_option correctly.
Roy Marples [Fri, 16 Jun 2017 09:19:57 +0000 (10:19 +0100)] 
Check return values of snprintf and print_option correctly.

8 years agoUse a better errno for running out of buffer.
Roy Marples [Fri, 16 Jun 2017 08:40:41 +0000 (09:40 +0100)] 
Use a better errno for running out of buffer.

8 years agoClarify RFC952 and RFC1123 to justify domain name restriction dhcpcd imposes.
Roy Marples [Fri, 16 Jun 2017 08:38:29 +0000 (09:38 +0100)] 
Clarify RFC952 and RFC1123 to justify domain name restriction dhcpcd imposes.

8 years agoRevert "RFC2181 section 11 says a DNS label can be pretty much anything."
Roy Marples [Fri, 16 Jun 2017 07:51:46 +0000 (08:51 +0100)] 
Revert "RFC2181 section 11 says a DNS label can be pretty much anything."

This reverts commit 6da580eefb0d94d1b377303e84af821556ab33b0.

8 years agoCount label and domain name length correctly.
Roy Marples [Wed, 14 Jun 2017 10:52:26 +0000 (11:52 +0100)] 
Count label and domain name length correctly.

8 years agoRFC2181 section 11 says a DNS label can be pretty much anything.
Roy Marples [Tue, 13 Jun 2017 21:01:58 +0000 (22:01 +0100)] 
RFC2181 section 11 says a DNS label can be pretty much anything.
So just test overall length and label length.

Thanks to Robert Elz.

8 years agoMake ipv6_newaddr() more flexable so it's the sole source of
Roy Marples [Tue, 13 Jun 2017 19:47:49 +0000 (20:47 +0100)] 
Make ipv6_newaddr() more flexable so it's the sole source of
creating ipv6_addr structures.

8 years agoNo need for signal.h here.
Roy Marples [Tue, 13 Jun 2017 19:19:52 +0000 (20:19 +0100)] 
No need for signal.h here.

8 years agoUse a long constant to avoid a lint error.
Roy Marples [Tue, 13 Jun 2017 19:09:58 +0000 (20:09 +0100)] 
Use a long constant to avoid a lint error.

8 years agoRemove some unused variables.
Roy Marples [Tue, 13 Jun 2017 19:06:13 +0000 (20:06 +0100)] 
Remove some unused variables.

8 years agollen is unused here.
Roy Marples [Tue, 13 Jun 2017 18:42:03 +0000 (19:42 +0100)] 
llen is unused here.

8 years agoGuard MAX_RTR_SOLICITATION_DELAY if platform defined.
Roy Marples [Tue, 13 Jun 2017 18:39:56 +0000 (19:39 +0100)] 
Guard MAX_RTR_SOLICITATION_DELAY if platform defined.

8 years agoAdd a lint target.
Roy Marples [Tue, 13 Jun 2017 18:19:09 +0000 (19:19 +0100)] 
Add a lint target.

8 years agoFix a lint issue.
Roy Marples [Tue, 13 Jun 2017 18:16:38 +0000 (19:16 +0100)] 
Fix a lint issue.

8 years agoTypo
Roy Marples [Tue, 13 Jun 2017 15:53:26 +0000 (16:53 +0100)] 
Typo

8 years agoRemove unused valid_path() function.
Roy Marples [Tue, 13 Jun 2017 15:07:46 +0000 (16:07 +0100)] 
Remove unused valid_path() function.

Thanks to Robert Elz.

8 years agoOptimize loop exit. Thanks to Robert Elz.
Roy Marples [Tue, 13 Jun 2017 14:52:27 +0000 (15:52 +0100)] 
Optimize loop exit. Thanks to Robert Elz.

8 years agoRemove usesless comment.
Roy Marples [Tue, 13 Jun 2017 14:45:55 +0000 (15:45 +0100)] 
Remove usesless comment.

8 years agoIn uniqify(), prefix a space if there is already a result when appending.
Roy Marples [Tue, 13 Jun 2017 14:29:45 +0000 (15:29 +0100)] 
In uniqify(), prefix a space if there is already a result when appending.
This means we don't have to trim a space on output.

8 years agodhcp: Fix classless static routes
Roy Marples [Mon, 29 May 2017 20:03:25 +0000 (22:03 +0200)] 
dhcp: Fix classless static routes

Summary:
Assign the netwask correctly from the message.
Fixes T122.

Test Plan: Test dhcpcd using the Classless Static Routes DHCP option.

Reviewers: c_14

Reviewed By: c_14

Maniphest Tasks: T122

Differential Revision: https://dev.marples.name/D116

8 years agoHardware Address validation
Roy Marples [Sat, 20 May 2017 12:51:41 +0000 (13:51 +0100)] 
Hardware Address validation

Summary:
The all zero's and all one's hardware address are reserved.
As such, they should not be used in dhcpcd.
Likewise, Router Solicitation messages should not contain an
all zero source address option.

Fixes T119.

Test Plan:
Request IPv6RA over a PPP interface on a suitable OS which assigns
an all zero's or all one's hardware address.

Maniphest Tasks: T119

Differential Revision: https://dev.marples.name/D114

8 years agoOnly reboot activated user interfaces.
Roy Marples [Mon, 15 May 2017 16:43:31 +0000 (17:43 +0100)] 
Only reboot activated user interfaces.