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

11 years agoExpire DHCP lease and then run no carrier as a seperate operation.
Roy Marples [Mon, 3 Mar 2014 12:10:58 +0000 (12:10 +0000)] 
Expire DHCP lease and then run no carrier as a seperate operation.
Instead of waiting the maximum amount of time to report DAD failure/completion, poll the address flags periodically.

11 years agoAs we do now listen to the udp socket directly, delete the fd from eloop when done.
Roy Marples [Sun, 2 Mar 2014 13:01:34 +0000 (13:01 +0000)] 
As we do now listen to the udp socket directly, delete the fd from eloop when done.

11 years agoWork better with autoconf build host
Roy Marples [Sun, 2 Mar 2014 08:36:19 +0000 (08:36 +0000)] 
Work better with autoconf build host

11 years agoCorrectly delete IPv6 addresses from eloop timeouts
Roy Marples [Sat, 1 Mar 2014 17:59:33 +0000 (17:59 +0000)] 
Correctly delete IPv6 addresses from eloop timeouts

11 years agoRelease dhcpcd-6.3.1 v6.3.1
Roy Marples [Sat, 1 Mar 2014 10:57:45 +0000 (10:57 +0000)] 
Release dhcpcd-6.3.1

11 years agoFix potential memory loss.
Roy Marples [Fri, 28 Feb 2014 20:37:06 +0000 (20:37 +0000)] 
Fix potential memory loss.

11 years agoIf CC is not defined, default it to cc
Roy Marples [Fri, 28 Feb 2014 20:32:34 +0000 (20:32 +0000)] 
If CC is not defined, default it to cc

11 years agoDon't set CC, always let the environment choose
Roy Marples [Fri, 28 Feb 2014 14:53:26 +0000 (14:53 +0000)] 
Don't set CC, always let the environment choose

11 years agoTidy some INET only and INET6 only warnings.
Roy Marples [Fri, 28 Feb 2014 11:02:32 +0000 (11:02 +0000)] 
Tidy some INET only and INET6 only warnings.

11 years agoFix some silly warnings.
Roy Marples [Fri, 28 Feb 2014 10:38:29 +0000 (10:38 +0000)] 
Fix some silly warnings.

11 years agoFix more clang analyzer warnings. i386/NetBSD and amd64/Linux are now clear.
Roy Marples [Fri, 28 Feb 2014 10:34:05 +0000 (10:34 +0000)] 
Fix more clang analyzer warnings. i386/NetBSD and amd64/Linux are now clear.

11 years agoFix more clang analyzer errors
Roy Marples [Thu, 27 Feb 2014 21:11:43 +0000 (21:11 +0000)] 
Fix more clang analyzer errors

11 years agoRemove dead line
Roy Marples [Thu, 27 Feb 2014 20:04:33 +0000 (20:04 +0000)] 
Remove dead line

11 years agoFix all errors reported by clang static analyser.
Roy Marples [Thu, 27 Feb 2014 20:00:39 +0000 (20:00 +0000)] 
Fix all errors reported by clang static analyser.

11 years agoFix some possible pointer checks.
Roy Marples [Thu, 27 Feb 2014 11:57:45 +0000 (11:57 +0000)] 
Fix some possible pointer checks.

11 years agoTypo
Roy Marples [Thu, 27 Feb 2014 10:59:04 +0000 (10:59 +0000)] 
Typo

11 years agoReport interface carrier state to the dhcpcd-run-hooks as ifcarrier.
Roy Marples [Thu, 27 Feb 2014 10:52:11 +0000 (10:52 +0000)] 
Report interface carrier state to the dhcpcd-run-hooks as ifcarrier.
If ifcarrier is up, don't start wpa_supplicant.

11 years agoDon't use a variable length buffer
Roy Marples [Tue, 25 Feb 2014 14:11:35 +0000 (14:11 +0000)] 
Don't use a variable length buffer

11 years agoRelease dhcpcd-6.3.0 v6.3.0
Roy Marples [Tue, 25 Feb 2014 11:12:35 +0000 (11:12 +0000)] 
Release dhcpcd-6.3.0

11 years agoDocument control sockets and DHCPv6 lease file.
Roy Marples [Tue, 25 Feb 2014 11:10:19 +0000 (11:10 +0000)] 
Document control sockets and DHCPv6 lease file.

11 years agoRespect initial commandline arguments when rebooting via a signal.
Roy Marples [Tue, 25 Feb 2014 10:24:01 +0000 (10:24 +0000)] 
Respect initial commandline arguments when rebooting via a signal.

11 years agoFix arping moving to the next test if we find the IP address
Roy Marples [Mon, 24 Feb 2014 14:40:29 +0000 (14:40 +0000)] 
Fix arping moving to the next test if we find the IP address
but do not have a profile for it.
Thanks to David McGurty for the analysis.

11 years agoAdd a USE_SIGNALS define.
Roy Marples [Fri, 21 Feb 2014 16:10:55 +0000 (16:10 +0000)] 
Add a USE_SIGNALS define.
If we're not using signals then we also create a control socket in the
non MASTER case. We then use this to communicate instead of signals.

11 years agoIf there are no file actions or dangerous attributes then use
Roy Marples [Fri, 21 Feb 2014 15:51:42 +0000 (15:51 +0000)] 
If there are no file actions or dangerous attributes then use
vfork(2) instead of fork(2) in our compat posix_spawn(3) function.

11 years agoWhen removing an interface we need to remove it's routes even if
Roy Marples [Fri, 21 Feb 2014 14:48:58 +0000 (14:48 +0000)] 
When removing an interface we need to remove it's routes even if
we're not deleting them.

11 years agoIf the prefix is not on link, nor autoconf and we don't know about it
Roy Marples [Fri, 14 Feb 2014 09:13:19 +0000 (09:13 +0000)] 
If the prefix is not on link, nor autoconf and we don't know about it
then just continue instead of logging a bogus error.
Thanks to David Purser.

11 years agoFix FreeBSD compile warnings.
Roy Marples [Thu, 13 Feb 2014 13:23:43 +0000 (13:23 +0000)] 
Fix FreeBSD compile warnings.

11 years agoOpen right socket.
Roy Marples [Thu, 13 Feb 2014 13:14:58 +0000 (13:14 +0000)] 
Open right socket.

11 years agoLog why we cannot delete a route
Roy Marples [Thu, 13 Feb 2014 13:07:44 +0000 (13:07 +0000)] 
Log why we cannot delete a route

11 years agoWork without SOCK_CLOEXEC again.
Roy Marples [Thu, 13 Feb 2014 12:58:58 +0000 (12:58 +0000)] 
Work without SOCK_CLOEXEC again.

11 years agoFix compile without INET or INET6.
Roy Marples [Thu, 13 Feb 2014 08:15:05 +0000 (08:15 +0000)] 
Fix compile without INET or INET6.

11 years agoEnsure we close the contol socket if we fail to connect.
Roy Marples [Wed, 12 Feb 2014 20:51:57 +0000 (20:51 +0000)] 
Ensure we close the contol socket if we fail to connect.
Don't crash when closing IPv6ND or DHCPv6 when not the IPv6 protocol is
not started.

11 years agoNo need to malloc pidfile.
Roy Marples [Wed, 12 Feb 2014 11:55:43 +0000 (11:55 +0000)] 
No need to malloc pidfile.

11 years agoReplace PATH_MAX with something more precise.
Roy Marples [Wed, 12 Feb 2014 11:27:25 +0000 (11:27 +0000)] 
Replace PATH_MAX with something more precise.

11 years agoPATH_MAX is too much, lets be more precise
Roy Marples [Wed, 12 Feb 2014 11:16:22 +0000 (11:16 +0000)] 
PATH_MAX is too much, lets be more precise

11 years agoEnsure we remove the socket from the eloop event queue before closing it.
Roy Marples [Wed, 12 Feb 2014 10:29:06 +0000 (10:29 +0000)] 
Ensure we remove the socket from the eloop event queue before closing it.

11 years agoRemove needless malloc
Roy Marples [Wed, 12 Feb 2014 10:27:29 +0000 (10:27 +0000)] 
Remove needless malloc

11 years agoFix compile on BSD
Roy Marples [Wed, 12 Feb 2014 09:25:58 +0000 (09:25 +0000)] 
Fix compile on BSD

11 years agoMove all global variables into contexts, with a small exception for
Roy Marples [Wed, 12 Feb 2014 00:39:46 +0000 (00:39 +0000)] 
Move all global variables into contexts, with a small exception for
signal handling.
This allows dhcpcd to work better in a threaded environment such as rtems.

11 years agoFix a compile warning
Roy Marples [Sat, 8 Feb 2014 10:41:29 +0000 (10:41 +0000)] 
Fix a compile warning

11 years agoFix writing the pidfile and cleaning up a bit better.
Roy Marples [Sat, 8 Feb 2014 10:36:38 +0000 (10:36 +0000)] 
Fix writing the pidfile and cleaning up a bit better.

11 years agoMove vendor out of global scope.
Roy Marples [Sat, 8 Feb 2014 00:29:02 +0000 (00:29 +0000)] 
Move vendor out of global scope.

11 years agoget_line is now static inside of if-options.c and is a simple wrapper around getline(3).
Roy Marples [Fri, 7 Feb 2014 21:48:24 +0000 (21:48 +0000)] 
get_line is now static inside of if-options.c and is a simple wrapper around getline(3).

11 years agoUse fgets instead
Roy Marples [Fri, 7 Feb 2014 21:25:26 +0000 (21:25 +0000)] 
Use fgets instead

11 years agoChanged in 2014
Roy Marples [Fri, 7 Feb 2014 21:10:46 +0000 (21:10 +0000)] 
Changed in 2014

11 years agoUse fscand instead of get_line
Roy Marples [Fri, 7 Feb 2014 21:04:37 +0000 (21:04 +0000)] 
Use fscand instead of get_line

11 years agoEnsure fscanf does not overflow.
Roy Marples [Fri, 7 Feb 2014 21:04:09 +0000 (21:04 +0000)] 
Ensure fscanf does not overflow.

11 years agoFix compile
Roy Marples [Fri, 7 Feb 2014 20:33:43 +0000 (20:33 +0000)] 
Fix compile

11 years agoUse fscanf instead of get_line when parsing /proc/cpuinfo
Roy Marples [Fri, 7 Feb 2014 20:31:29 +0000 (20:31 +0000)] 
Use fscanf instead of get_line when parsing /proc/cpuinfo

11 years agoRemove some dead uses of get_monotonic
Roy Marples [Fri, 7 Feb 2014 19:41:35 +0000 (19:41 +0000)] 
Remove some dead uses of get_monotonic

11 years agoMove DUID_LEN to a better header.
Roy Marples [Fri, 7 Feb 2014 19:40:20 +0000 (19:40 +0000)] 
Move DUID_LEN to a better header.

11 years agowritepid is now a static inline function
Roy Marples [Fri, 7 Feb 2014 17:48:13 +0000 (17:48 +0000)] 
writepid is now a static inline function

11 years agoRemove custom set_cloexec and set_nonblock functions.
Roy Marples [Fri, 7 Feb 2014 17:32:08 +0000 (17:32 +0000)] 
Remove custom set_cloexec and set_nonblock functions.
Instead pass O_CLOEXEC or SOCK_CLOEXEC to open, socket, etc.
This requires a fairly modern system.

11 years agoUse our own signal structure instead of siginfo_t to save space.
Roy Marples [Fri, 7 Feb 2014 15:49:33 +0000 (15:49 +0000)] 
Use our own signal structure instead of siginfo_t to save space.

11 years agoIgnore netlink messages with an our of range pid.
Roy Marples [Fri, 7 Feb 2014 14:57:19 +0000 (14:57 +0000)] 
Ignore netlink messages with an our of range pid.

11 years agoCopy the siginfo_t structure onto a global copy and pass that as an
Roy Marples [Fri, 7 Feb 2014 14:39:22 +0000 (14:39 +0000)] 
Copy the siginfo_t structure onto a global copy and pass that as an
argument to eloop_timeout_add_now so that every actionis async signal safe.

11 years agoSet memory to zero
Roy Marples [Fri, 7 Feb 2014 11:18:33 +0000 (11:18 +0000)] 
Set memory to zero

11 years agoSet dev fd to -1 when stopped.
Roy Marples [Fri, 7 Feb 2014 11:06:17 +0000 (11:06 +0000)] 
Set dev fd to -1 when stopped.

11 years agoDon't hold onto an AF_INET socket for the duration of the program,
Roy Marples [Fri, 7 Feb 2014 11:03:39 +0000 (11:03 +0000)] 
Don't hold onto an AF_INET socket for the duration of the program,
open and close it as required.

11 years agoExit correctly if no interfaces have a carrier.
Roy Marples [Fri, 7 Feb 2014 09:33:32 +0000 (09:33 +0000)] 
Exit correctly if no interfaces have a carrier.

11 years agoFix opening the control socket.
Roy Marples [Wed, 5 Feb 2014 18:32:13 +0000 (18:32 +0000)] 
Fix opening the control socket.

11 years agoUse fscanf some more.
Roy Marples [Wed, 5 Feb 2014 18:11:32 +0000 (18:11 +0000)] 
Use fscanf some more.

11 years agoReplace get_line with sscanf
Roy Marples [Wed, 5 Feb 2014 16:44:24 +0000 (16:44 +0000)] 
Replace get_line with sscanf

11 years agopidfd can be static now.
Roy Marples [Wed, 5 Feb 2014 13:18:58 +0000 (13:18 +0000)] 
pidfd can be static now.

11 years agoMove control globals into a context.
Roy Marples [Wed, 5 Feb 2014 12:01:09 +0000 (12:01 +0000)] 
Move control globals into a context.

11 years agoOnly return 0 from daemonise if we have forked successfully, otherwise the pid of...
Roy Marples [Tue, 4 Feb 2014 15:53:56 +0000 (15:53 +0000)] 
Only return 0 from daemonise if we have forked successfully, otherwise the pid of the child.

11 years agoFork correctly from RA and DAD.
Roy Marples [Tue, 4 Feb 2014 15:46:38 +0000 (15:46 +0000)] 
Fork correctly from RA and DAD.

11 years agoReset kernel RA flag correctly.
Roy Marples [Tue, 4 Feb 2014 15:45:51 +0000 (15:45 +0000)] 
Reset kernel RA flag correctly.

11 years agoChanged these files in 2014.
Roy Marples [Tue, 4 Feb 2014 14:55:04 +0000 (14:55 +0000)] 
Changed these files in 2014.

11 years agoFix compile
Roy Marples [Tue, 4 Feb 2014 14:41:35 +0000 (14:41 +0000)] 
Fix compile

11 years agoRemove DEBUG_MEMORY guard and always free memory and resources.
Roy Marples [Tue, 4 Feb 2014 14:39:26 +0000 (14:39 +0000)] 
Remove DEBUG_MEMORY guard and always free memory and resources.
Remove all atexit(3) and exit(3) calls, instead exiting via the eloop.

11 years agoDrain the correct UDP socket.
Roy Marples [Mon, 3 Feb 2014 17:30:03 +0000 (17:30 +0000)] 
Drain the correct UDP socket.

11 years agoWe don't want to show cc errors here
Roy Marples [Mon, 3 Feb 2014 17:29:36 +0000 (17:29 +0000)] 
We don't want to show cc errors here

11 years agoOpen UDP sockets for *.*.*.*:bootpc and $ip_address:bootpc
Roy Marples [Mon, 3 Feb 2014 14:12:14 +0000 (14:12 +0000)] 
Open UDP sockets for *.*.*.*:bootpc and $ip_address:bootpc

11 years agoOnly link to libmd if it lives in /lib
Roy Marples [Mon, 3 Feb 2014 13:24:04 +0000 (13:24 +0000)] 
Only link to libmd if it lives in /lib

11 years agoFix make import with compat sources.
Roy Marples [Mon, 3 Feb 2014 13:09:13 +0000 (13:09 +0000)] 
Fix make import with compat sources.
Use -lmd for MD5 if available.

11 years agoOnly listen to the UDP port if we opened it.
Roy Marples [Mon, 3 Feb 2014 11:39:25 +0000 (11:39 +0000)] 
Only listen to the UDP port if we opened it.

11 years agoRFC7083 has new inital timer values.
Roy Marples [Mon, 3 Feb 2014 11:02:17 +0000 (11:02 +0000)] 
RFC7083 has new inital timer values.

11 years agoAdd support for the following RFCs:
Roy Marples [Mon, 3 Feb 2014 10:28:30 +0000 (10:28 +0000)] 
Add support for the following RFCs:
DHCP SLP Directory Agent, RFC2610
DHCP Name Service Search, RFC2937
DHCP PANA Authentication Agent, RFC5192
DHCP Lost Server, RFC5223
DHCP CAPWAP, RFC5417
DHCP Mobility Services, RFC5678
DHCP SIP UA, RFC6011
DHCP ANDSF, RFC6153
DHCP RDNSS Selection for MIF Nodes, RFC6731
DHCP TFTP Server Address, RFC5859
DHCP PXELINUX, RFC5071
DHCP Access Network Domain Name, RFC5986
DHCP Virtual Subnet Selection, RFC6607
DHCP Relay Agent Remote-ID, RFC4649
DHCP Relay Agent Subscriber-ID, RFC4580
DHCPv6 Relay-ID, RFC5460
DHCPv6 LIS Discovery, RFC5986
DHCPv6 SIP UA, RFC6011
DHCPv6 Network Boot, RFC5970
DHCPv6 Home Info Discovery in MIPv6, RFC6610
DHCPv6 RDNSS Selection for MIF Nodes, RFC6731
DHCPv6 Kerberos, RFC6784
DHCPv6 Relay-Triggered Reconfiguraion, RFC6977
DHCPv6 SOL_MAX_RT, RFC7083