]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
11 years agoFix compiler warning
Roy Marples [Fri, 30 May 2014 22:03:50 +0000 (22:03 +0000)] 
Fix compiler warning

11 years agoFix configure error
Roy Marples [Fri, 30 May 2014 22:02:16 +0000 (22:02 +0000)] 
Fix configure error

11 years agoLoad config.{h,mk} when building tests. Fixes [1c11c59282].
Roy Marples [Fri, 30 May 2014 21:47:14 +0000 (21:47 +0000)] 
Load config.{h,mk} when building tests. Fixes [1c11c59282].

11 years ago-4 and -6 are now mutually exclusive and when running on a single interface
Roy Marples [Thu, 29 May 2014 12:52:27 +0000 (12:52 +0000)] 
-4 and -6 are now mutually exclusive and when running on a single interface
per protocol pidfiles are created.
This means that other control options suchs as -x and -n will require the
-4 or -6 option as well.

11 years agoCheck naming rules before calling dev_initialized.
Roy Marples [Thu, 29 May 2014 11:12:09 +0000 (11:12 +0000)] 
Check naming rules before calling dev_initialized.

11 years agoOnly process IPv6 neighbour messages from the link socket if we have inited
Roy Marples [Thu, 29 May 2014 06:43:54 +0000 (06:43 +0000)] 
Only process IPv6 neighbour messages from the link socket if we have inited
our internal IPv6 state.

11 years agoFix dev warning.
Roy Marples [Sat, 24 May 2014 20:11:42 +0000 (20:11 +0000)] 
Fix dev warning.

11 years agoShould use arc4random_uniform when wanting a randon number between
Roy Marples [Sat, 24 May 2014 19:58:50 +0000 (19:58 +0000)] 
Should use arc4random_uniform when wanting a randon number between
1 and N.
Improve the compat arc4random function a little and re-stir on fork.

11 years agoAdd a compat syslog function if the libc syslog does not support LOG_PERROR.
Roy Marples [Sat, 24 May 2014 13:08:29 +0000 (13:08 +0000)] 
Add a compat syslog function if the libc syslog does not support LOG_PERROR.
Add a non working if-sun.c stub.
Define IN6_IFF_TENTATIVE and friends to zero so IPv6 at least compiles on Solaris.
Warn that Solaris support presently does not work.

11 years agoSource now compiles on Solaris, just missing the if-sun.c support so
Roy Marples [Wed, 21 May 2014 23:07:52 +0000 (23:07 +0000)] 
Source now compiles on Solaris, just missing the if-sun.c support so
linking fails.

11 years agoSockets would be opened with PF_*, not AF_*.
Roy Marples [Tue, 20 May 2014 08:54:00 +0000 (08:54 +0000)] 
Sockets would be opened with PF_*, not AF_*.

11 years agoOnly remove the interface from DHCP consideration if the error
Roy Marples [Tue, 20 May 2014 08:36:12 +0000 (08:36 +0000)] 
Only remove the interface from DHCP consideration if the error
sending a packet is not a network error.

11 years agoIf a DHCPv6 lease expires as well as all IPv6 routers who want DHCPv6, don't restart...
Roy Marples [Mon, 19 May 2014 00:49:14 +0000 (00:49 +0000)] 
If a DHCPv6 lease expires as well as all IPv6 routers who want DHCPv6, don't restart discover.

11 years agoAlthough dhcpcd now works fine with non blocking sockets, we never ever want to block...
Roy Marples [Mon, 19 May 2014 00:32:04 +0000 (00:32 +0000)] 
Although dhcpcd now works fine with non blocking sockets, we never ever want to block either.
So restore the the NON blocking flags.

11 years agoOnly remove the interface from the list once all callouts have been
Roy Marples [Fri, 16 May 2014 15:03:28 +0000 (15:03 +0000)] 
Only remove the interface from the list once all callouts have been
completed.

11 years agoDon't set probe state here.
Roy Marples [Fri, 16 May 2014 15:02:58 +0000 (15:02 +0000)] 
Don't set probe state here.

11 years agoOnly send interfaces which have a reason.
Roy Marples [Thu, 15 May 2014 12:02:03 +0000 (12:02 +0000)] 
Only send interfaces which have a reason.

11 years agocontrolgroup option changes group ownership of the control socket.
Roy Marples [Fri, 9 May 2014 12:09:05 +0000 (12:09 +0000)] 
controlgroup option changes group ownership of the control socket.

11 years agoEnsure that ND6_IFF_PERFORMNUD is set.
Roy Marples [Thu, 8 May 2014 23:55:33 +0000 (23:55 +0000)] 
Ensure that ND6_IFF_PERFORMNUD is set.

11 years agoFix compile issue
Roy Marples [Thu, 8 May 2014 23:38:15 +0000 (23:38 +0000)] 
Fix compile issue

11 years agoSupport RTM_GETNEIGH on Linux as well as the polling for NUD changes on BSD.
Roy Marples [Thu, 8 May 2014 23:35:30 +0000 (23:35 +0000)] 
Support RTM_GETNEIGH on Linux as well as the polling for NUD changes on BSD.
Fixes [bb6153d18b].

11 years agoPoll kernel neighbour reachability (SIOCGNBRINFO_IN6) for each router
Roy Marples [Wed, 7 May 2014 13:31:32 +0000 (13:31 +0000)] 
Poll kernel neighbour reachability (SIOCGNBRINFO_IN6) for each router
instead of sending and listening for Neighbour Soliciation/Advertisement
packets. The kernel is privy to a lot more reachability information than
userland is.
Fixes [bb6153d18b].

11 years agoRun NOCARRIER before dropping protocols.
Roy Marples [Wed, 7 May 2014 09:22:26 +0000 (09:22 +0000)] 
Run NOCARRIER before dropping protocols.

11 years agoThese are not DHCP states.
Roy Marples [Tue, 6 May 2014 18:15:52 +0000 (18:15 +0000)] 
These are not DHCP states.

11 years agoAdd the interface to our list before initing state.
Roy Marples [Tue, 6 May 2014 18:14:43 +0000 (18:14 +0000)] 
Add the interface to our list before initing state.

11 years agoAlways send a carrier as it's no longer encapsulated in the IPv4 stack.
Roy Marples [Tue, 6 May 2014 14:42:24 +0000 (14:42 +0000)] 
Always send a carrier as it's no longer encapsulated in the IPv4 stack.
When stopping and not departed, run with the STOPPED reason but do
not process it in hooks.

11 years agoWhen dropping, move the new config onto the old before running the script.
Roy Marples [Tue, 6 May 2014 14:39:31 +0000 (14:39 +0000)] 
When dropping, move the new config onto the old before running the script.

11 years agoWhen rebooting, directly call send_request to preserve state.
Roy Marples [Tue, 6 May 2014 12:42:39 +0000 (12:42 +0000)] 
When rebooting, directly call send_request to preserve state.

11 years agoFix sending DHCPv6
Roy Marples [Mon, 5 May 2014 21:21:31 +0000 (21:21 +0000)] 
Fix sending DHCPv6

11 years agoFix new dhcp environment options
Roy Marples [Mon, 5 May 2014 20:18:14 +0000 (20:18 +0000)] 
Fix new dhcp environment options

11 years agoFix writing interfaces to control socket.
Roy Marples [Sun, 4 May 2014 22:48:43 +0000 (22:48 +0000)] 
Fix writing interfaces to control socket.

11 years agoFix compile.
Roy Marples [Sat, 3 May 2014 21:18:20 +0000 (21:18 +0000)] 
Fix compile.

11 years agoRFC2131 section 4.4.1 states the client SHOULD wait a random time between
Roy Marples [Sat, 3 May 2014 19:56:15 +0000 (19:56 +0000)] 
RFC2131 section 4.4.1 states the client SHOULD wait a random time between
one and ten seconds to desynchronize the use of DHCP at startup.
Instead we wait a random time between zero and one second to mirror
the more modern IPv6RS and DHCPv6 standards unless overridden by
defining RFC2131_STRICT.

11 years agoRespect RFC4861 MAX_RTR_SOLICITATION_DELAY as specified in section 6.3.7.
Roy Marples [Sat, 3 May 2014 19:53:22 +0000 (19:53 +0000)] 
Respect RFC4861 MAX_RTR_SOLICITATION_DELAY as specified in section 6.3.7.

11 years agoCheck secondaries value before writing it as /proc could be read-only.
Roy Marples [Sat, 3 May 2014 10:17:48 +0000 (10:17 +0000)] 
Check secondaries value before writing it as /proc could be read-only.

11 years agoRemove accidental commit.
Roy Marples [Sat, 3 May 2014 00:12:19 +0000 (00:12 +0000)] 
Remove accidental commit.

11 years agoMinor optimisation
Roy Marples [Sat, 3 May 2014 00:11:15 +0000 (00:11 +0000)] 
Minor optimisation

11 years agoPut POLLHUP back
Roy Marples [Sat, 3 May 2014 00:08:12 +0000 (00:08 +0000)] 
Put POLLHUP back

11 years agoSet EOF correctly
Roy Marples [Sat, 3 May 2014 00:02:14 +0000 (00:02 +0000)] 
Set EOF correctly

11 years agoChange the readrawsocket API a little so that we know when EOF is reached.
Roy Marples [Fri, 2 May 2014 23:54:29 +0000 (23:54 +0000)] 
Change the readrawsocket API a little so that we know when EOF is reached.
This allows us to remove the non blocking option from our sockets due to the way BPF works.

11 years agoLog any errors sending the interface afer a getinterfaces call.
Roy Marples [Fri, 2 May 2014 20:57:21 +0000 (20:57 +0000)] 
Log any errors sending the interface afer a getinterfaces call.

11 years agoAccepted sockets should be marked non blocking.
Roy Marples [Fri, 2 May 2014 20:56:10 +0000 (20:56 +0000)] 
Accepted sockets should be marked non blocking.

11 years agoWhen a node first becomes stale, fire off a NS probe anyway.
Roy Marples [Fri, 2 May 2014 14:23:41 +0000 (14:23 +0000)] 
When a node first becomes stale, fire off a NS probe anyway.
This is outside of the RFC, but it seems that some nodes do not
respond with a NA fast enough to avoid log spam.

11 years agoOnce reachability + randomisation has passed, wait DELAY_FIRST_PROBE_TIME
Roy Marples [Fri, 2 May 2014 12:31:21 +0000 (12:31 +0000)] 
Once reachability + randomisation has passed, wait DELAY_FIRST_PROBE_TIME
seconds and then send MAX_UNICAST_SOLICIT probes at retranstimer intervals.
If no confirmation and another retranstimer interval has passed, expire the
address.

More RFC4861 conformant.

11 years agoOptimise the initial probe timer.
Roy Marples [Fri, 2 May 2014 11:03:46 +0000 (11:03 +0000)] 
Optimise the initial probe timer.
Don't send more than MAX_UNICAST_SOLICIT reachability probes.

11 years agoThe unreachable timer should start AFTER the initial discovery packet is
Roy Marples [Fri, 2 May 2014 10:16:00 +0000 (10:16 +0000)] 
The unreachable timer should start AFTER the initial discovery packet is
sent, and that is first send after the retransmission timer has fired.

11 years agoDocument why we don't send both FQDN and hostname options.
Roy Marples [Fri, 2 May 2014 06:40:21 +0000 (06:40 +0000)] 
Document why we don't send both FQDN and hostname options.

11 years agoRemove debug
Roy Marples [Wed, 30 Apr 2014 14:14:03 +0000 (14:14 +0000)] 
Remove debug

11 years agoSupport ND6_IFF_OVERRIDE_RTADV
Roy Marples [Wed, 30 Apr 2014 14:13:22 +0000 (14:13 +0000)] 
Support ND6_IFF_OVERRIDE_RTADV

11 years agoFix some potential memory errors.
Roy Marples [Wed, 30 Apr 2014 10:02:20 +0000 (10:02 +0000)] 
Fix some potential memory errors.

11 years agoFix some possible leaks.
Roy Marples [Wed, 30 Apr 2014 09:50:00 +0000 (09:50 +0000)] 
Fix some possible leaks.

11 years agoFix an unassigned memory error.
Roy Marples [Wed, 30 Apr 2014 09:35:48 +0000 (09:35 +0000)] 
Fix an unassigned memory error.

11 years agoSupport IFA_F_NOPREFIXROUTE on Linux.
Roy Marples [Mon, 28 Apr 2014 23:56:21 +0000 (23:56 +0000)] 
Support IFA_F_NOPREFIXROUTE on Linux.

11 years agoFix compile on Linux
Roy Marples [Mon, 28 Apr 2014 23:13:47 +0000 (23:13 +0000)] 
Fix compile on Linux

11 years agoSorting interfaces is an IPv4 specific task, so move it into ipv4.c
Roy Marples [Mon, 28 Apr 2014 12:47:33 +0000 (12:47 +0000)] 
Sorting interfaces is an IPv4 specific task, so move it into ipv4.c

11 years agoNamespace all public dhcpcd.c functions.
Roy Marples [Mon, 28 Apr 2014 12:02:12 +0000 (12:02 +0000)] 
Namespace all public dhcpcd.c functions.
Add ipv4, ipv6, dhcp and dhcp6 options to re-enable if disabled globally.
Try and load a delegated interface if not running on all interfaces.
Fix delegated interfaces without a prefix set.

11 years agoprintf time_t, hmmmm
Roy Marples [Fri, 25 Apr 2014 13:14:21 +0000 (13:14 +0000)] 
printf time_t, hmmmm

11 years agoFix some -Wconversion errors on FreeBSD.
Roy Marples [Fri, 25 Apr 2014 13:05:15 +0000 (13:05 +0000)] 
Fix some -Wconversion errors on FreeBSD.

11 years agoFix compile on Linux.
Roy Marples [Fri, 25 Apr 2014 11:53:14 +0000 (11:53 +0000)] 
Fix compile on Linux.

11 years agoFix compile on OpenBSD.
Roy Marples [Fri, 25 Apr 2014 11:11:05 +0000 (11:11 +0000)] 
Fix compile on OpenBSD.

11 years agoMove net.c to if.c.
Roy Marples [Fri, 25 Apr 2014 10:42:37 +0000 (10:42 +0000)] 
Move net.c to if.c.
Ensure that if.c and if-KERNEL.c are namespaced correctly.

11 years agoAdd more TAILQ #ifdef tests for older queue.h's
Roy Marples [Fri, 25 Apr 2014 08:46:08 +0000 (08:46 +0000)] 
Add more TAILQ #ifdef tests for older queue.h's

11 years agoSupport older Linux kernels where DAD is not reported.
Roy Marples [Fri, 25 Apr 2014 08:31:26 +0000 (08:31 +0000)] 
Support older Linux kernels where DAD is not reported.

11 years agoFix --disable-embedded [f097d9f0ef]
Roy Marples [Fri, 25 Apr 2014 08:16:02 +0000 (08:16 +0000)] 
Fix --disable-embedded [f097d9f0ef]

11 years agoSupport older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO.
Roy Marples [Thu, 24 Apr 2014 09:41:25 +0000 (09:41 +0000)] 
Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO.

11 years agoWork without IFA_F_OPTIMISTIC on Linux.
Roy Marples [Thu, 24 Apr 2014 09:28:31 +0000 (09:28 +0000)] 
Work without IFA_F_OPTIMISTIC on Linux.

11 years agoSupport older linux without SOCK_CLOEXEC.
Roy Marples [Thu, 24 Apr 2014 08:56:21 +0000 (08:56 +0000)] 
Support older linux without SOCK_CLOEXEC.

11 years agoMove all Linux only sources into if-linux.c
Roy Marples [Wed, 23 Apr 2014 23:29:41 +0000 (23:29 +0000)] 
Move all Linux only sources into if-linux.c

11 years agoFix compat/queue.h
Roy Marples [Wed, 23 Apr 2014 20:29:03 +0000 (20:29 +0000)] 
Fix compat/queue.h

11 years agoMove all BSD only sources into if-bsd.c
Roy Marples [Wed, 23 Apr 2014 20:09:20 +0000 (20:09 +0000)] 
Move all BSD only sources into if-bsd.c

11 years agoCompile embedded in without a config
Roy Marples [Wed, 23 Apr 2014 19:09:03 +0000 (19:09 +0000)] 
Compile embedded in without a config

11 years agoAdd missing file
Roy Marples [Wed, 23 Apr 2014 19:00:29 +0000 (19:00 +0000)] 
Add missing file

11 years agogmake-4 supports != shell assignment operator, like BSD make.
Roy Marples [Wed, 23 Apr 2014 16:00:50 +0000 (16:00 +0000)] 
gmake-4 supports != shell assignment operator, like BSD make.
This breaks our hack to support both, so workaround by using GNUmakefile at
the toplevel.
Note that building a source release now requires BSD make or gmake-4

11 years agoAdd config-null.mk and a nasty hack to include config.mk instead if it exists.
Roy Marples [Wed, 23 Apr 2014 14:09:03 +0000 (14:09 +0000)] 
Add config-null.mk and a nasty hack to include config.mk instead if it exists.
This allows make clean to work without configure being run.

11 years agoFix compile without IPv4
Roy Marples [Wed, 23 Apr 2014 14:07:32 +0000 (14:07 +0000)] 
Fix compile without IPv4

11 years agoDon't spam timezone updates unless its actually changed.
Roy Marples [Wed, 23 Apr 2014 13:03:01 +0000 (13:03 +0000)] 
Don't spam timezone updates unless its actually changed.

11 years agoFix compile on OpenBSD
Roy Marples [Wed, 23 Apr 2014 11:41:01 +0000 (11:41 +0000)] 
Fix compile on OpenBSD

11 years agoFix GNU make depend
Roy Marples [Wed, 23 Apr 2014 10:02:13 +0000 (10:02 +0000)] 
Fix GNU make depend

11 years agoDefine a macro to include spawn.h or compat/spawn.h instead of forcing it in.
Roy Marples [Wed, 23 Apr 2014 09:43:30 +0000 (09:43 +0000)] 
Define a macro to include spawn.h or compat/spawn.h instead of forcing it in.

11 years agoShip a compat queue.h for older systems without any TAILQ support.
Roy Marples [Wed, 23 Apr 2014 09:34:42 +0000 (09:34 +0000)] 
Ship a compat queue.h for older systems without any TAILQ support.

11 years agoWork with older libc's without O_CLOEXEC.
Roy Marples [Fri, 18 Apr 2014 13:17:42 +0000 (13:17 +0000)] 
Work with older libc's without O_CLOEXEC.

11 years agoDocument debug
Roy Marples [Sun, 6 Apr 2014 17:50:53 +0000 (17:50 +0000)] 
Document debug

11 years agoOn a read error, remove the FD from eloop.
Roy Marples [Tue, 1 Apr 2014 11:48:57 +0000 (11:48 +0000)] 
On a read error, remove the FD from eloop.
This shouldn't happen really.

11 years agoMove the bpf filter len to a define.
Roy Marples [Tue, 1 Apr 2014 10:17:09 +0000 (10:17 +0000)] 
Move the bpf filter len to a define.

11 years agoMore number differences
Roy Marples [Mon, 31 Mar 2014 20:10:46 +0000 (20:10 +0000)] 
More number differences

11 years agoBPF filter size is unsigned int
Roy Marples [Mon, 31 Mar 2014 20:00:06 +0000 (20:00 +0000)] 
BPF filter size is unsigned int

11 years ago64-bit clang fallout
Roy Marples [Thu, 27 Mar 2014 23:15:14 +0000 (23:15 +0000)] 
64-bit clang fallout

11 years agoFix some 64-bit fallout
Roy Marples [Thu, 27 Mar 2014 23:00:32 +0000 (23:00 +0000)] 
Fix some 64-bit fallout

11 years agoAdd -Wconversion to debug CFLAGS and fix fallout.
Roy Marples [Thu, 27 Mar 2014 22:14:52 +0000 (22:14 +0000)] 
Add -Wconversion to debug CFLAGS and fix fallout.

11 years agoDon't need to zero as many bytes.
Roy Marples [Thu, 27 Mar 2014 19:12:03 +0000 (19:12 +0000)] 
Don't need to zero as many bytes.
Thanks to Alan Barrett.

11 years agoDefault to building static for a $PREFIX of \ for non Linux platforms
Roy Marples [Wed, 26 Mar 2014 11:16:02 +0000 (11:16 +0000)] 
Default to building static for a $PREFIX of \ for non Linux platforms
if ld.elf-so or similar cannot be found in /libexec.

11 years agoBlank build
Roy Marples [Mon, 24 Mar 2014 18:41:34 +0000 (18:41 +0000)] 
Blank build

11 years agoSo apparently target is just for compilers and we should be using host instead.
Roy Marples [Mon, 24 Mar 2014 18:40:45 +0000 (18:40 +0000)] 
So apparently target is just for compilers and we should be using host instead.

11 years agoIf given --build or --host targets, the expectation is we try and find
Roy Marples [Mon, 24 Mar 2014 11:07:19 +0000 (11:07 +0000)] 
If given --build or --host targets, the expectation is we try and find
a compiler for that target.

11 years agoglibc 2.17 has clock_gettime in libc directly, so test for it.
Roy Marples [Sun, 23 Mar 2014 13:38:09 +0000 (13:38 +0000)] 
glibc 2.17 has clock_gettime in libc directly, so test for it.
test for dlopen being in libc as well.

11 years agoBe specific
Roy Marples [Sat, 22 Mar 2014 20:42:40 +0000 (20:42 +0000)] 
Be specific

11 years agoIf not specified, Delegated Prefixes will get an automatic SLA of the
Roy Marples [Sat, 22 Mar 2014 19:55:29 +0000 (19:55 +0000)] 
If not specified, Delegated Prefixes will get an automatic SLA of the
interface index. If the biggest SLA and the assigned prefix fits into a /64
then dhcpcd creates a /64 prefix so that SLAAC works. If bigger than /64
is needed then dhcpcd creates one rounded upto the nearest multiple of 8.

Unless a configured SLA of 0 is assigned, a reject route for the Delegated
Prefix is installed to stop unassigned addresses trying to be resolved upstream.

Addresses added from Delegated Prefixes now have a default address suffix of 1
instead of using a SLAAC style address.

11 years agoFix compile.
Roy Marples [Thu, 20 Mar 2014 17:06:28 +0000 (17:06 +0000)] 
Fix compile.

11 years agoAdd a reject route for the delegated prefix so that unassigned prefixes don't go...
Roy Marples [Thu, 20 Mar 2014 16:36:03 +0000 (16:36 +0000)] 
Add a reject route for the delegated prefix so that unassigned prefixes don't go back upstream.

11 years agoBSD has per interface rtadv kernel flag, handle it as per Linux.
Roy Marples [Thu, 20 Mar 2014 13:48:59 +0000 (13:48 +0000)] 
BSD has per interface rtadv kernel flag, handle it as per Linux.
When enabling IPv6 ensure that disabled is cleared and auto link-local is set.