]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
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.

11 years agoWork with FreeBSD ypbind as well.
Roy Marples [Wed, 19 Mar 2014 16:51:57 +0000 (16:51 +0000)] 
Work with FreeBSD ypbind as well.

11 years agoSupport ypbind on OpenBSD.
Roy Marples [Wed, 19 Mar 2014 15:02:30 +0000 (15:02 +0000)] 
Support ypbind on OpenBSD.

11 years agoWe don't want to find TENTATIVE addresses
Roy Marples [Tue, 18 Mar 2014 23:14:10 +0000 (23:14 +0000)] 
We don't want to find TENTATIVE addresses

11 years agoOnly fork when the RA has a RDNSS option AND a valid prefix OR no DHCPv6
Roy Marples [Tue, 18 Mar 2014 23:03:07 +0000 (23:03 +0000)] 
Only fork when the RA has a RDNSS option AND a valid prefix OR no DHCPv6
instruction.

11 years agoRelease dhcpcd-6.3.2 v6.3.2
Roy Marples [Fri, 14 Mar 2014 10:48:14 +0000 (10:48 +0000)] 
Release dhcpcd-6.3.2

11 years agoIf we can't use cc then try and find a working compiler.
Roy Marples [Thu, 13 Mar 2014 00:42:16 +0000 (00:42 +0000)] 
If we can't use cc then try and find a working compiler.

11 years agoSet hoplimit by IPV6_MULTICAST_HOPS intead of each time we send.
Roy Marples [Wed, 12 Mar 2014 15:59:19 +0000 (15:59 +0000)] 
Set hoplimit by IPV6_MULTICAST_HOPS intead of each time we send.

11 years agoRemove notion of hoplimit from DHCPv6
Roy Marples [Wed, 12 Mar 2014 15:39:53 +0000 (15:39 +0000)] 
Remove notion of hoplimit from DHCPv6

11 years agoClarify hop limit
Roy Marples [Wed, 12 Mar 2014 00:50:02 +0000 (00:50 +0000)] 
Clarify hop limit

11 years agoSet a hop limit on our DHCPv6 messages.
Roy Marples [Tue, 11 Mar 2014 23:41:16 +0000 (23:41 +0000)] 
Set a hop limit on our DHCPv6 messages.

11 years agoWhitespace
Roy Marples [Tue, 11 Mar 2014 23:00:14 +0000 (23:00 +0000)] 
Whitespace

11 years agoRemove the last of the SEND_DAD code
Roy Marples [Tue, 11 Mar 2014 22:53:05 +0000 (22:53 +0000)] 
Remove the last of the SEND_DAD code

11 years agoMore fixes to dhcp dumping leases.
Roy Marples [Tue, 11 Mar 2014 22:37:10 +0000 (22:37 +0000)] 
More fixes to dhcp dumping leases.
When running dump and test hooks, exit early to allow as non root.

11 years agoFix a crash when dumping a DHCPv4 lease.
Roy Marples [Tue, 11 Mar 2014 22:35:22 +0000 (22:35 +0000)] 
Fix a crash when dumping a DHCPv4 lease.
Thanks to Mikhail Efremov.

11 years agoEnsure that -M -x ifname does the right thing.
Roy Marples [Tue, 11 Mar 2014 10:41:27 +0000 (10:41 +0000)] 
Ensure that -M -x ifname does the right thing.

11 years agoDescribe DHCPv6 better.
Roy Marples [Tue, 11 Mar 2014 09:39:52 +0000 (09:39 +0000)] 
Describe DHCPv6 better.

11 years agoValidate an accepted reconfigure key if we don't require authentication.
Roy Marples [Tue, 11 Mar 2014 09:39:23 +0000 (09:39 +0000)] 
Validate an accepted reconfigure key if we don't require authentication.

11 years agoFix reconfigure behaviour
Roy Marples [Mon, 10 Mar 2014 17:37:24 +0000 (17:37 +0000)] 
Fix reconfigure behaviour

11 years agoFix a crash when accepting a reconfigure key.
Roy Marples [Mon, 10 Mar 2014 15:28:49 +0000 (15:28 +0000)] 
Fix a crash when accepting a reconfigure key.
Check if a reconfigure message before checking state so reconfigure works.

11 years agoOnly check for carrier if state is still unknown.
Roy Marples [Fri, 7 Mar 2014 22:14:13 +0000 (22:14 +0000)] 
Only check for carrier if state is still unknown.

11 years agoForce a static build for OpenBSD and a SBINDIR of /sbin
Roy Marples [Fri, 7 Mar 2014 16:03:52 +0000 (16:03 +0000)] 
Force a static build for OpenBSD and a SBINDIR of /sbin

11 years agoDetect OpenBSD rc system (check instead of status).
Roy Marples [Fri, 7 Mar 2014 14:29:52 +0000 (14:29 +0000)] 
Detect OpenBSD rc system (check instead of status).

If ntpd.conf exists but ntp.conf does not, configure ntpd.conf instead.

11 years agoLog args and ignore --disable-silent-rules
Roy Marples [Fri, 7 Mar 2014 13:35:10 +0000 (13:35 +0000)] 
Log args and ignore --disable-silent-rules

11 years agoA router with a lifetime of zero is no longer a default router.
Roy Marples [Fri, 7 Mar 2014 13:01:20 +0000 (13:01 +0000)] 
A router with a lifetime of zero is no longer a default router.
However, the options it passes do have lifetimes which we should still
respect according to RFC4861 section 4.2.

11 years agoAdd -M, --master to force dhcpcd into master mode.
Roy Marples [Fri, 7 Mar 2014 10:22:37 +0000 (10:22 +0000)] 
Add -M, --master to force dhcpcd into master mode.

11 years agoRationalise signal handling - HUP now rebinds, ALRM now releases, USR1 reapplies...
Roy Marples [Fri, 7 Mar 2014 10:08:58 +0000 (10:08 +0000)] 
Rationalise signal handling - HUP now rebinds, ALRM now releases, USR1 reapplies config.

11 years agortm_hdrlen is OpenBSD only and doesn't appear to be needed.
Roy Marples [Fri, 7 Mar 2014 07:17:44 +0000 (07:17 +0000)] 
rtm_hdrlen is OpenBSD only and doesn't appear to be needed.

11 years agoDeleting IPv4 subnet routes and IPv6 prefixes now works on OpenBSD.
Roy Marples [Thu, 6 Mar 2014 22:29:26 +0000 (22:29 +0000)] 
Deleting IPv4 subnet routes and IPv6 prefixes now works on OpenBSD.

11 years agoFix assignment error from strcpy removal.
Roy Marples [Thu, 6 Mar 2014 19:30:30 +0000 (19:30 +0000)] 
Fix assignment error from strcpy removal.

11 years agoTentative does not mean RTM_DELADDR.
Roy Marples [Thu, 6 Mar 2014 19:11:55 +0000 (19:11 +0000)] 
Tentative does not mean RTM_DELADDR.
This fixes RTM address handling on FreeBSD and OpenBSD.

Instead of listening for duplicate address messages for
FreeBSD and OpenBSD simply poll for the address flag changing.
This means less code to maintain and hopefully less error-prone.

Remove dead code which send a DAD as this is, and should,
be done entirely in the kernel.

11 years agoWe need AF_LINK and AF_INET sockets. Sigh.
Roy Marples [Thu, 6 Mar 2014 14:54:53 +0000 (14:54 +0000)] 
We need AF_LINK and AF_INET sockets. Sigh.

11 years agoInitial support for OpenBSD interface and routing priority.
Roy Marples [Thu, 6 Mar 2014 14:41:58 +0000 (14:41 +0000)] 
Initial support for OpenBSD interface and routing priority.

11 years agoWe changed this file in 2014
Roy Marples [Thu, 6 Mar 2014 09:44:00 +0000 (09:44 +0000)] 
We changed this file in 2014

11 years agodhcpcd device context is from temporary storage, so copy the struct.
Roy Marples [Thu, 6 Mar 2014 09:28:02 +0000 (09:28 +0000)] 
dhcpcd device context is from temporary storage, so copy the struct.
Thanks to Sergey Kvachonok.

11 years agoChange the last strcpy calls to strlcpy.
Roy Marples [Thu, 6 Mar 2014 09:12:06 +0000 (09:12 +0000)] 
Change the last strcpy calls to strlcpy.

11 years agoCompile and work on OpenBSD.
Roy Marples [Wed, 5 Mar 2014 18:11:22 +0000 (18:11 +0000)] 
Compile and work on OpenBSD.
However, there is a problem deleting both IPv4 and IPv6 subnet routes.
Also, there is a problem opening a BPF fd in non blocking mode directly and
posix_spawn(3) fails to work so we block that in configure.

11 years agoAdjust comment to match expected behaviour
Roy Marples [Wed, 5 Mar 2014 11:21:51 +0000 (11:21 +0000)] 
Adjust comment to match expected behaviour

11 years agoNetBSD sh seems to break with *[![:alnum:]-_]* but works with *[![:alnum:]_-]*
Roy Marples [Tue, 4 Mar 2014 23:17:40 +0000 (23:17 +0000)] 
NetBSD sh seems to break with *[![:alnum:]-_]* but works with *[![:alnum:]_-]*

11 years agoNo need for this code when we can reliably work with IPv6 RTM_DELADDR messages
Roy Marples [Tue, 4 Mar 2014 17:13:40 +0000 (17:13 +0000)] 
No need for this code when we can reliably work with IPv6 RTM_DELADDR messages

11 years agoWhitespace
Roy Marples [Tue, 4 Mar 2014 13:31:42 +0000 (13:31 +0000)] 
Whitespace

11 years agoSanitize some gcc options in -Wall.
Roy Marples [Tue, 4 Mar 2014 13:12:07 +0000 (13:12 +0000)] 
Sanitize some gcc options in -Wall.
Remove -fno-common.
Move embedded dhcpcd configuration to from data segment to text.

11 years agoWe should really check fscanf value here.
Roy Marples [Tue, 4 Mar 2014 10:07:15 +0000 (10:07 +0000)] 
We should really check fscanf value here.

11 years agoTo avoid any future problems, log the TARGET we dervive the OS from.
Roy Marples [Tue, 4 Mar 2014 10:02:58 +0000 (10:02 +0000)] 
To avoid any future problems, log the TARGET we dervive the OS from.

11 years agooptions is long long.....
Roy Marples [Mon, 3 Mar 2014 19:57:24 +0000 (19:57 +0000)] 
options is long long.....

11 years agoJust make the configure a bit easier.
Roy Marples [Mon, 3 Mar 2014 17:25:28 +0000 (17:25 +0000)] 
Just make the configure a bit easier.

11 years agoWe don't care about the result of these functions.
Roy Marples [Mon, 3 Mar 2014 15:52:02 +0000 (15:52 +0000)] 
We don't care about the result of these functions.

11 years agoFudge deriving os from Debian style
Roy Marples [Mon, 3 Mar 2014 15:48:07 +0000 (15:48 +0000)] 
Fudge deriving os from Debian style

11 years agoWe shouldn't need this anymore
Roy Marples [Mon, 3 Mar 2014 14:06:27 +0000 (14:06 +0000)] 
We shouldn't need this anymore

11 years agoCorrect man page RUNDIR
Roy Marples [Mon, 3 Mar 2014 13:58:51 +0000 (13:58 +0000)] 
Correct man page RUNDIR

11 years agoWhen deleting IPv6 addresses, remove them from our internal address state
Roy Marples [Mon, 3 Mar 2014 13:56:49 +0000 (13:56 +0000)] 
When deleting IPv6 addresses, remove them from our internal address state
as well so we perform DAD when rebinding.
Remove debug added with prior commit.