]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
12 years agoMove the signal reboot code into it's own function which is fired by
Roy Marples [Mon, 18 Feb 2013 10:35:47 +0000 (10:35 +0000)] 
Move the signal reboot code into it's own function which is fired by
and eloop timeout of 0 seconds. We do this because we shouldn't modify
variables in a signal handler.

12 years agoIf we fail to send an IPv6 RS then DHCP6 won't work either.
Roy Marples [Mon, 18 Feb 2013 08:13:43 +0000 (08:13 +0000)] 
If we fail to send an IPv6 RS then DHCP6 won't work either.

12 years agoRemove debug
Roy Marples [Sun, 17 Feb 2013 18:22:42 +0000 (18:22 +0000)] 
Remove debug

12 years agoWork on FreeBSD9 where we fail on some interfaces
Roy Marples [Sun, 17 Feb 2013 18:17:29 +0000 (18:17 +0000)] 
Work on FreeBSD9 where we fail on some interfaces

12 years agoFix compile on FreeBSD
Roy Marples [Sun, 17 Feb 2013 16:12:54 +0000 (16:12 +0000)] 
Fix compile on FreeBSD

12 years agoIf we don't have a state, send a carrier status
Roy Marples [Sat, 16 Feb 2013 17:53:13 +0000 (17:53 +0000)] 
If we don't have a state, send a carrier status

12 years agoFix compile.
Roy Marples [Sat, 16 Feb 2013 13:25:31 +0000 (13:25 +0000)] 
Fix compile.

12 years agoRemove the xmalloc function.
Roy Marples [Sat, 16 Feb 2013 13:21:35 +0000 (13:21 +0000)] 
Remove the xmalloc function.
Now we have removed all our xmalloc like functions dhcpcd can still
try to operate as best it can in low memory conditions.

12 years agoAvoid printing a silly warning on an unknown option
Roy Marples [Fri, 15 Feb 2013 22:55:42 +0000 (22:55 +0000)] 
Avoid printing a silly warning on an unknown option

12 years agoRemove xstrdup
Roy Marples [Fri, 15 Feb 2013 22:46:47 +0000 (22:46 +0000)] 
Remove xstrdup

12 years agoRemove xrealloc
Roy Marples [Fri, 15 Feb 2013 22:20:18 +0000 (22:20 +0000)] 
Remove xrealloc

12 years agoRemove xzalloc function
Roy Marples [Fri, 15 Feb 2013 21:45:08 +0000 (21:45 +0000)] 
Remove xzalloc function

12 years agoInstead of opening link, ipv6, ipv6rs and ipv6ns sockets globally,
Roy Marples [Fri, 15 Feb 2013 20:33:13 +0000 (20:33 +0000)] 
Instead of opening link, ipv6, ipv6rs and ipv6ns sockets globally,
only open when the first link wanting this features needs it.
Hopefully fixes #263 and #264.

12 years agoAdd -h|--help option to configure
Roy Marples [Fri, 15 Feb 2013 20:07:26 +0000 (20:07 +0000)] 
Add -h|--help option to configure

12 years agoIf we have one interface enabled for IPv6 RS, we stupidly process
Roy Marples [Tue, 5 Feb 2013 10:15:59 +0000 (10:15 +0000)] 
If we have one interface enabled for IPv6 RS, we stupidly process
RAs for all interfaces we control. This patch fixes this and
updates the man page to reflect this better.

12 years agoFix compile on BSD
Roy Marples [Mon, 4 Feb 2013 14:12:48 +0000 (14:12 +0000)] 
Fix compile on BSD

12 years agoIt's now possible to compile out IPv4 and IPv6 support by passing
Roy Marples [Mon, 4 Feb 2013 13:30:35 +0000 (13:30 +0000)] 
It's now possible to compile out IPv4 and IPv6 support by passing
--disable-ipv4 or --disable-ipv6 to configure.

12 years agoMove ipv4 specific code out of net.c and into ipv4.c
Roy Marples [Mon, 4 Feb 2013 11:03:08 +0000 (11:03 +0000)] 
Move ipv4 specific code out of net.c and into ipv4.c

12 years agoMove if_state into interface->if_data as dhcp_state.
Roy Marples [Sun, 3 Feb 2013 22:55:45 +0000 (22:55 +0000)] 
Move if_state into interface->if_data as dhcp_state.
This should reduce memory usage for non IPv4 interfaces.

12 years agoMove ipv4 specific infos from interface to if_state.
Roy Marples [Sun, 3 Feb 2013 14:52:24 +0000 (14:52 +0000)] 
Move ipv4 specific infos from interface to if_state.

12 years agoMove options away from ipv4 state to the interface.
Roy Marples [Sun, 3 Feb 2013 10:35:59 +0000 (10:35 +0000)] 
Move options away from ipv4 state to the interface.

12 years agoRemove IPv4 and DHCP4 specific setup from dhcpcd.c and move into ipv4.c
Roy Marples [Sat, 2 Feb 2013 14:05:55 +0000 (14:05 +0000)] 
Remove IPv4 and DHCP4 specific setup from dhcpcd.c and move into ipv4.c
and dhcp.c
Split configure.c into script.c and move the rest into dhcp.c

This starts the goal of making the base of dhcpcd protocol agnostic and
working towards building IPv4 and/or IPv6 code only to reduce size and
allow growing any future new protocol easier.

12 years agoFix potential issue if we don't want routes and we fail a decode.
Roy Marples [Mon, 28 Jan 2013 09:54:51 +0000 (09:54 +0000)] 
Fix potential issue if we don't want routes and we fail a decode.

12 years agoEnsure that nooption correctly woks for routes.
Roy Marples [Mon, 28 Jan 2013 09:45:05 +0000 (09:45 +0000)] 
Ensure that nooption correctly woks for routes.

12 years agoCheck the correct interface the RAP came from before overwriting it.
Roy Marples [Fri, 18 Jan 2013 19:59:01 +0000 (19:59 +0000)] 
Check the correct interface the RAP came from before overwriting it.

12 years agoPreserve the space in static routes on the command line.
Roy Marples [Thu, 20 Dec 2012 19:35:57 +0000 (19:35 +0000)] 
Preserve the space in static routes on the command line.

12 years agoRelease dhcpcd-5.99.3 v5.99.3
Roy Marples [Wed, 19 Dec 2012 10:11:50 +0000 (10:11 +0000)] 
Release dhcpcd-5.99.3

12 years agoFix default onlink value.
Roy Marples [Tue, 11 Dec 2012 09:51:48 +0000 (09:51 +0000)] 
Fix default onlink value.

12 years agoRespect the ONLINK flag the prefix option of the RA
Roy Marples [Tue, 11 Dec 2012 09:00:49 +0000 (09:00 +0000)] 
Respect the ONLINK flag the prefix option of the RA

13 years agoFix compile on BSD.
Roy Marples [Fri, 7 Dec 2012 10:49:36 +0000 (10:49 +0000)] 
Fix compile on BSD.

13 years agoLog error whe starting DHCPv6 without RA.
Roy Marples [Fri, 7 Dec 2012 09:46:49 +0000 (09:46 +0000)] 
Log error whe starting DHCPv6 without RA.

13 years agoIf no IPv6 proc or sysctl entries exist for RA or forward, assume it's OK.
Roy Marples [Fri, 7 Dec 2012 09:43:56 +0000 (09:43 +0000)] 
If no IPv6 proc or sysctl entries exist for RA or forward, assume it's OK.

13 years agoAvoid sillyness if not a valid IPv6 address
Roy Marples [Sat, 24 Nov 2012 20:35:53 +0000 (20:35 +0000)] 
Avoid sillyness if not a valid IPv6 address

13 years agoSet %interface for exported IPv6 link local addresses.
Roy Marples [Sat, 24 Nov 2012 20:11:49 +0000 (20:11 +0000)] 
Set %interface for exported IPv6 link local addresses.

13 years agoNormalise timing
Roy Marples [Tue, 13 Nov 2012 20:40:04 +0000 (20:40 +0000)] 
Normalise timing

13 years agoMove free to exit function.
Roy Marples [Tue, 13 Nov 2012 17:30:19 +0000 (17:30 +0000)] 
Move free to exit function.

13 years agoDiscard addresses if expired on reboot
Roy Marples [Tue, 13 Nov 2012 17:28:47 +0000 (17:28 +0000)] 
Discard addresses if expired on reboot

13 years agoStop probing when dropped
Roy Marples [Tue, 13 Nov 2012 15:40:00 +0000 (15:40 +0000)] 
Stop probing when dropped

13 years agoSend to all dhcp agents instead of all routers.
Roy Marples [Tue, 13 Nov 2012 15:16:27 +0000 (15:16 +0000)] 
Send to all dhcp agents instead of all routers.

13 years agoUse a proper namespace for IPv4LL
Roy Marples [Tue, 13 Nov 2012 11:44:20 +0000 (11:44 +0000)] 
Use a proper namespace for IPv4LL

13 years agoUse a proper namespace for eloop
Roy Marples [Tue, 13 Nov 2012 11:25:51 +0000 (11:25 +0000)] 
Use a proper namespace for eloop

13 years agoUse a proper namespace for control
Roy Marples [Tue, 13 Nov 2012 10:17:19 +0000 (10:17 +0000)] 
Use a proper namespace for control

13 years agoFix some memory issues
Roy Marples [Tue, 13 Nov 2012 09:39:20 +0000 (09:39 +0000)] 
Fix some memory issues

13 years agoExpire the DHCPv6 lease when carrier drops.
Roy Marples [Sun, 11 Nov 2012 19:56:01 +0000 (19:56 +0000)] 
Expire the DHCPv6 lease when carrier drops.

13 years agoAlways close this fd
Roy Marples [Sun, 11 Nov 2012 19:55:25 +0000 (19:55 +0000)] 
Always close this fd

13 years agoImprove logging of script exiting.
Roy Marples [Sun, 11 Nov 2012 12:19:19 +0000 (12:19 +0000)] 
Improve logging of script exiting.

13 years agoLog posix_spawn(2) errors better.
Roy Marples [Sun, 11 Nov 2012 00:25:58 +0000 (00:25 +0000)] 
Log posix_spawn(2) errors better.

In our compat shim, use fork(2) if we have it, otherwise vfork(2).
This makes us a lot better in terms of reliability, but sucks for
reporting errors.

13 years agoBecause posix_spawn(2) implementations can use fork(2) we have no
Roy Marples [Sun, 11 Nov 2012 00:04:02 +0000 (00:04 +0000)] 
Because posix_spawn(2) implementations can use fork(2) we have no
way of knowing any error actually executing the new image,
such as it doesn't exist or no permission.

For the time being, simply log a generic error.

13 years agoeloop doesn't check errors atm
Roy Marples [Sun, 11 Nov 2012 00:03:28 +0000 (00:03 +0000)] 
eloop doesn't check errors atm

13 years agoBreak after processing a callback
Roy Marples [Sat, 10 Nov 2012 18:06:14 +0000 (18:06 +0000)] 
Break after processing a callback

13 years agoFix memory errors
Roy Marples [Sat, 10 Nov 2012 17:55:37 +0000 (17:55 +0000)] 
Fix memory errors

13 years ago_NSIG seems to be the norm. Use _SIG_MAXSIG if available otherwise guess.
Roy Marples [Sat, 10 Nov 2012 17:29:34 +0000 (17:29 +0000)] 
_NSIG seems to be the norm. Use _SIG_MAXSIG if available otherwise guess.

13 years agoFix compile of the new compat shims on NetBSD.
Roy Marples [Sat, 10 Nov 2012 16:53:00 +0000 (16:53 +0000)] 
Fix compile of the new compat shims on NetBSD.

13 years agoAdd a pselect(2) shim for systems that lack support for it.
Roy Marples [Sat, 10 Nov 2012 16:38:53 +0000 (16:38 +0000)] 
Add a pselect(2) shim for systems that lack support for it.
When building, warn that it's not entirely race condition safe.

13 years agoReplace poll(2) with pselect(2) and vfork(2)+execve(2) with
Roy Marples [Sat, 10 Nov 2012 16:38:52 +0000 (16:38 +0000)] 
Replace poll(2) with pselect(2) and vfork(2)+execve(2) with
posix_spawn(3).
Now we block all our signals at startup and allow pselect to
unblock them for the duration of the call. This allows us to
manage interrupts in a fashion to guarantee a consistent
internal state.

I have added a posix_spawn compat shim for systems that lack
that call. pselect(2) has been supported on target for some time
so there is no need for a compat shim there.

13 years agoAdd a message to indicate dhcpcd exited cleanly.
Roy Marples [Sat, 10 Nov 2012 08:44:48 +0000 (08:44 +0000)] 
Add a message to indicate dhcpcd exited cleanly.

13 years agoSilence a gcc signed vs unsigned warning by comparing to 0.
Roy Marples [Fri, 9 Nov 2012 09:50:34 +0000 (09:50 +0000)] 
Silence a gcc signed vs unsigned warning by comparing to 0.

13 years agoWe should check start len >0 as len will be zero at this point.
Roy Marples [Thu, 8 Nov 2012 00:08:36 +0000 (00:08 +0000)] 
We should check start len >0 as len will be zero at this point.

13 years agoWhen decoding RCC3397 domains we should ensure that we have
Roy Marples [Wed, 7 Nov 2012 23:51:04 +0000 (23:51 +0000)] 
When decoding RCC3397 domains we should ensure that we have
decoded something before changing the last '.' to ' ' and
NULL terminating the string.

13 years agoEnsure we have a big enough buffer for an escaped DNSSL option.
Roy Marples [Wed, 7 Nov 2012 14:19:45 +0000 (14:19 +0000)] 
Ensure we have a big enough buffer for an escaped DNSSL option.

13 years agoWhen an RA is forced to expire, don't run the script twice.
Roy Marples [Wed, 7 Nov 2012 00:49:33 +0000 (00:49 +0000)] 
When an RA is forced to expire, don't run the script twice.

13 years agoImplement the core DHCPv6 client for SOLICIT, REQUEST, RENEW, CONFIRM.
Roy Marples [Tue, 6 Nov 2012 23:40:15 +0000 (23:40 +0000)] 
Implement the core DHCPv6 client for SOLICIT, REQUEST, RENEW, CONFIRM.

13 years agoFix some more potential leaks and allow full build with dmalloc.
root@uberpc.marples.name [Thu, 1 Nov 2012 17:02:01 +0000 (17:02 +0000)] 
Fix some more potential leaks and allow full build with dmalloc.

13 years agoPlug some memory leaks.
Roy Marples [Thu, 1 Nov 2012 14:46:05 +0000 (14:46 +0000)] 
Plug some memory leaks.

13 years agoIf we receive >1 MTU option, last one takes precendence.
Roy Marples [Thu, 1 Nov 2012 02:12:15 +0000 (02:12 +0000)] 
If we receive >1 MTU option, last one takes precendence.

13 years agoSave a few bytes
Roy Marples [Wed, 31 Oct 2012 23:07:06 +0000 (23:07 +0000)] 
Save a few bytes

13 years agoExpire RDNSS and DNSSL options if the RA expires.
Roy Marples [Wed, 31 Oct 2012 22:56:41 +0000 (22:56 +0000)] 
Expire RDNSS and DNSSL options if the RA expires.

13 years agoMerge multiple options together as per RFC4861 section 6.3.4
Roy Marples [Wed, 31 Oct 2012 22:29:28 +0000 (22:29 +0000)] 
Merge multiple options together as per RFC4861 section 6.3.4

13 years agowhitespace
Roy Marples [Wed, 31 Oct 2012 20:17:59 +0000 (20:17 +0000)] 
whitespace

13 years agoProvide TAILQ_FOREACH_REVERSE_SAFE if not defined.
Roy Marples [Wed, 31 Oct 2012 20:14:08 +0000 (20:14 +0000)] 
Provide TAILQ_FOREACH_REVERSE_SAFE if not defined.
When removing routes, do it in reverse order.

13 years agoNo need to check if we have a prefix, as this could be a localised LAN.
Roy Marples [Wed, 31 Oct 2012 17:21:42 +0000 (17:21 +0000)] 
No need to check if we have a prefix, as this could be a localised LAN.

13 years agoWhen we receive a RA with a lifetime of 0, we should just remove
Roy Marples [Wed, 31 Oct 2012 17:10:22 +0000 (17:10 +0000)] 
When we receive a RA with a lifetime of 0, we should just remove
the default router and let any options expire as set in accordance
with RFC4861 section 4.2

13 years agoOnly remove IPv6 addresses when no RA's have them configured.
Roy Marples [Wed, 31 Oct 2012 13:58:36 +0000 (13:58 +0000)] 
Only remove IPv6 addresses when no RA's have them configured.

13 years agoIf we receive a RA with a lifetime of 0, just expire it right away
Roy Marples [Wed, 31 Oct 2012 12:34:27 +0000 (12:34 +0000)] 
If we receive a RA with a lifetime of 0, just expire it right away
and continue.

13 years agoIANA PEN should be in network order.
Roy Marples [Wed, 31 Oct 2012 10:42:44 +0000 (10:42 +0000)] 
IANA PEN should be in network order.

13 years agoDHCPCD Project has been assigned a PEN of 40712
Roy Marples [Wed, 31 Oct 2012 10:37:13 +0000 (10:37 +0000)] 
DHCPCD Project has been assigned a PEN of 40712

13 years agoImprove reported timings.
Roy Marples [Sat, 27 Oct 2012 12:11:04 +0000 (12:11 +0000)] 
Improve reported timings.

13 years agoShow renew and rebind times when debugging is enabled.
Roy Marples [Sat, 27 Oct 2012 11:38:17 +0000 (11:38 +0000)] 
Show renew and rebind times when debugging is enabled.
Trying to help #259.

13 years agoFix stupid length validation check.
Roy Marples [Wed, 24 Oct 2012 19:38:09 +0000 (19:38 +0000)] 
Fix stupid length validation check.

13 years agoFix compile fr systems without RTF_CLONING such as FreeBSD-8
Roy Marples [Wed, 24 Oct 2012 12:59:20 +0000 (12:59 +0000)] 
Fix compile fr systems without RTF_CLONING such as FreeBSD-8

13 years agoMore fixes to validation lengths.
Roy Marples [Wed, 24 Oct 2012 12:13:55 +0000 (12:13 +0000)] 
More fixes to validation lengths.

13 years agoFix variable length encodings
Roy Marples [Wed, 24 Oct 2012 12:01:03 +0000 (12:01 +0000)] 
Fix variable length encodings

13 years agoIf we receive a packet with two options the same which is not
Roy Marples [Wed, 24 Oct 2012 11:47:28 +0000 (11:47 +0000)] 
If we receive a packet with two options the same which is not
supposed to be an array then we now trim to the correct size
rather than just discarding the option.
This also means that if any garbage at the end of the singule
occurance of an option is also discarded.

13 years agoDrop DHCPv6 on carrier down.
Roy Marples [Fri, 12 Oct 2012 19:10:04 +0000 (19:10 +0000)] 
Drop DHCPv6 on carrier down.
Send DHCPv6 interface information.

13 years agoRemove needless malloc.
Roy Marples [Fri, 12 Oct 2012 12:30:22 +0000 (12:30 +0000)] 
Remove needless malloc.

13 years agoIf there is not IPv6 subnet route to delete, don't moan.
Roy Marples [Fri, 12 Oct 2012 12:13:16 +0000 (12:13 +0000)] 
If there is not IPv6 subnet route to delete, don't moan.

13 years agoFix code for -Wstrict-overflow
Roy Marples [Fri, 12 Oct 2012 11:26:20 +0000 (11:26 +0000)] 
Fix code for -Wstrict-overflow

13 years agoAdd DHCPv6 INFORM support.
Roy Marples [Fri, 12 Oct 2012 10:31:51 +0000 (10:31 +0000)] 
Add DHCPv6 INFORM support.
This is automatically started when RA flags O is set.
If no DHCPv6 request options are configured in dhcpcd.conf then we
request domain servers and search lists.

13 years agoMove the default vendor string to a global variable.
Roy Marples [Tue, 9 Oct 2012 13:20:50 +0000 (13:20 +0000)] 
Move the default vendor string to a global variable.
When an interface starts, it assigns this by default instead of
generating it each time.

13 years agoFix DUID support.
Roy Marples [Tue, 9 Oct 2012 13:14:56 +0000 (13:14 +0000)] 
Fix DUID support.
In the case where we cannot write a DUID file, then create a LL ID
instead of a LLT ID.

13 years agoMake this file actually work
Roy Marples [Mon, 8 Oct 2012 16:25:36 +0000 (16:25 +0000)] 
Make this file actually work

13 years agoDon't need this header
Roy Marples [Mon, 8 Oct 2012 16:18:30 +0000 (16:18 +0000)] 
Don't need this header

13 years agoxid should be treated in network byte order
Roy Marples [Mon, 8 Oct 2012 16:13:47 +0000 (16:13 +0000)] 
xid should be treated in network byte order

13 years agoMove the RS state into a struct in a generic data array.
Roy Marples [Sat, 22 Sep 2012 18:25:17 +0000 (18:25 +0000)] 
Move the RS state into a struct in a generic data array.
We should move the DHCP code there, but more importantly allows
DHCP6 to slot in later.

13 years agoRestart the interface immediately after a NAK instead of
Roy Marples [Sat, 22 Sep 2012 13:28:34 +0000 (13:28 +0000)] 
Restart the interface immediately after a NAK instead of
waiting one second.

13 years agoRelease dhcpcd-5.6.2 v5.6.2
Roy Marples [Mon, 3 Sep 2012 08:49:14 +0000 (08:49 +0000)] 
Release dhcpcd-5.6.2

13 years agoEnsure we have correct memory allocation for number of prefixes.
Roy Marples [Thu, 30 Aug 2012 16:26:38 +0000 (16:26 +0000)] 
Ensure we have correct memory allocation for number of prefixes.

13 years agoOnly accept netlink messages from the kernel.
Roy Marples [Fri, 24 Aug 2012 19:05:26 +0000 (19:05 +0000)] 
Only accept netlink messages from the kernel.
Thanks to Mikhail Efremov.

13 years agoOnly add our own host or destination routes to the build table when
Roy Marples [Thu, 23 Aug 2012 08:39:16 +0000 (08:39 +0000)] 
Only add our own host or destination routes to the build table when
we are adding gateways.
Thanks to Nazarov Yuriy Pavlovich.

13 years agoRemove -v from --version in usage.
Roy Marples [Sat, 18 Aug 2012 13:58:53 +0000 (13:58 +0000)] 
Remove -v from --version in usage.