]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
16 years agoFix some config reading.
Roy Marples [Mon, 18 Aug 2008 12:46:18 +0000 (12:46 +0000)] 
Fix some config reading.

16 years agoThe require directive now requires that the required options are present in each...
Roy Marples [Mon, 18 Aug 2008 12:43:05 +0000 (12:43 +0000)] 
The require directive now requires that the required options are present in each DHCP message. A few variables and functions have also been renamed to make this part more readable.

16 years agoDocument correct background option in dhcpcd.conf
Roy Marples [Sun, 17 Aug 2008 15:13:23 +0000 (15:13 +0000)] 
Document correct background option in dhcpcd.conf

16 years agoFix compat.
Roy Marples [Fri, 15 Aug 2008 19:29:24 +0000 (19:29 +0000)] 
Fix compat.

16 years agoRelease dhcpcd-4.0.0-rc5
Roy Marples [Fri, 15 Aug 2008 19:24:39 +0000 (19:24 +0000)] 
Release dhcpcd-4.0.0-rc5

16 years agoIf cmp and diff aren't around, try a text match using cat. After all, we are working...
Roy Marples [Fri, 15 Aug 2008 11:33:33 +0000 (11:33 +0000)] 
If cmp and diff aren't around, try a text match using cat. After all, we are working with text files.

16 years agoDon't enforce that keys are space separated
Roy Marples [Fri, 15 Aug 2008 11:06:27 +0000 (11:06 +0000)] 
Don't enforce that keys are space separated

16 years agosed may not always be available, so use shell loops to replicate behaviour in this...
Roy Marples [Fri, 15 Aug 2008 09:07:56 +0000 (09:07 +0000)] 
sed may not always be available, so use shell loops to replicate behaviour in this case

16 years agoFix cmp test.
Roy Marples [Fri, 15 Aug 2008 03:31:37 +0000 (03:31 +0000)] 
Fix cmp test.

16 years agoRemove the append/clean framework and prefer a store and merge
Roy Marples [Fri, 15 Aug 2008 03:22:21 +0000 (03:22 +0000)] 
Remove the append/clean framework and prefer a store and merge
approach. It's more work, but the end result looks cleaner.

16 years agoRe-jig the order of doing things to improve our logging.
Roy Marples [Thu, 14 Aug 2008 16:16:06 +0000 (16:16 +0000)] 
Re-jig the order of doing things to improve our logging.

16 years agoIf a device is not found, report it.
Roy Marples [Thu, 14 Aug 2008 16:15:45 +0000 (16:15 +0000)] 
If a device is not found, report it.

16 years agoDon't warn about dhcpcd not running when using --renew.
Roy Marples [Thu, 14 Aug 2008 16:00:37 +0000 (16:00 +0000)] 
Don't warn about dhcpcd not running when using --renew.

17 years agoDon't error if no interfaces or the state dir does not exist.
Roy Marples [Thu, 14 Aug 2008 12:37:44 +0000 (12:37 +0000)] 
Don't error if no interfaces or the state dir does not exist.

17 years agoSet the main state dir in the main hook script.
Roy Marples [Thu, 14 Aug 2008 12:17:23 +0000 (12:17 +0000)] 
Set the main state dir in the main hook script.

17 years agoDon't quote for uniqify and use 1 sed call instead of looping.
Roy Marples [Thu, 14 Aug 2008 12:14:23 +0000 (12:14 +0000)] 
Don't quote for uniqify and use 1 sed call instead of looping.

17 years agoMove uniqify to dhcpcd-run-hooks
Roy Marples [Thu, 14 Aug 2008 11:00:58 +0000 (11:00 +0000)] 
Move uniqify to dhcpcd-run-hooks

17 years agoIf resolvconf is not present, try and emulate it's functionality just for dhcpcd...
Roy Marples [Thu, 14 Aug 2008 10:38:15 +0000 (10:38 +0000)] 
If resolvconf is not present, try and emulate it's functionality just for dhcpcd so we can sanely handle >1 instance running.

17 years agoMake signature more sane and fix comment.
Roy Marples [Thu, 14 Aug 2008 10:37:11 +0000 (10:37 +0000)] 
Make signature more sane and fix comment.

17 years agoWe should always run the script on FAIL.
Roy Marples [Thu, 14 Aug 2008 08:34:38 +0000 (08:34 +0000)] 
We should always run the script on FAIL.

17 years agoBe consistent with dhcient - always PREINIT on startup. We can use this to purge...
Roy Marples [Thu, 14 Aug 2008 08:06:21 +0000 (08:06 +0000)] 
Be consistent with dhcient - always PREINIT on startup. We can use this to purge stale configuration.

17 years agoclassid -> vendorclassid to match the RFC description.
Roy Marples [Wed, 13 Aug 2008 21:29:30 +0000 (21:29 +0000)] 
classid -> vendorclassid to match the RFC description.

17 years agoAllow reqmask of numbers.
Roy Marples [Wed, 13 Aug 2008 20:26:41 +0000 (20:26 +0000)] 
Allow reqmask of numbers.

17 years agoFix INFORM and document it in dhcpcd-run-hooks.
Roy Marples [Wed, 13 Aug 2008 19:41:40 +0000 (19:41 +0000)] 
Fix INFORM and document it in dhcpcd-run-hooks.

17 years agoFix segfault.
Roy Marples [Wed, 13 Aug 2008 17:06:02 +0000 (17:06 +0000)] 
Fix segfault.

17 years agoCheck for localhost.localdomain as needing a new hostname.
Roy Marples [Wed, 13 Aug 2008 16:02:42 +0000 (16:02 +0000)] 
Check for localhost.localdomain as needing a new hostname.

17 years agoSupport head and tail files for resolv.conf
Roy Marples [Wed, 13 Aug 2008 15:39:34 +0000 (15:39 +0000)] 
Support head and tail files for resolv.conf

17 years agoScrub compile warnings on FreeBSD.
Roy Marples [Wed, 13 Aug 2008 15:09:13 +0000 (15:09 +0000)] 
Scrub compile warnings on FreeBSD.

17 years agoFix removing old stale entries.
Roy Marples [Wed, 13 Aug 2008 14:56:46 +0000 (14:56 +0000)] 
Fix removing old stale entries.

17 years agocontent -> configuration
Roy Marples [Wed, 13 Aug 2008 14:53:46 +0000 (14:53 +0000)] 
content -> configuration

17 years agoRemove the word inteface from the signature.
Roy Marples [Wed, 13 Aug 2008 14:46:49 +0000 (14:46 +0000)] 
Remove the word inteface from the signature.

17 years agoUse append_conf return value.
Roy Marples [Wed, 13 Aug 2008 13:00:20 +0000 (13:00 +0000)] 
Use append_conf return value.

17 years agoDon't cast needlessly.
Roy Marples [Wed, 13 Aug 2008 12:35:33 +0000 (12:35 +0000)] 
Don't cast needlessly.

17 years agoFix an buffer overflow leading to random bytes in the hardware address.
Roy Marples [Wed, 13 Aug 2008 12:29:32 +0000 (12:29 +0000)] 
Fix an buffer overflow leading to random bytes in the hardware address.

17 years agoAdd a framework for top an tailing config files with DHCP data and a method for clean...
Roy Marples [Wed, 13 Aug 2008 12:07:27 +0000 (12:07 +0000)] 
Add a framework for top an tailing config files with DHCP data and a method for cleaning them.

17 years agoFix -n when already running.
Roy Marples [Tue, 12 Aug 2008 23:56:09 +0000 (23:56 +0000)] 
Fix -n when already running.

17 years agoRemove the signature variable - each hook makes it's own.
Roy Marples [Tue, 12 Aug 2008 23:32:18 +0000 (23:32 +0000)] 
Remove the signature variable - each hook makes it's own.
ntp.conf now preserves existing server entries and cleans stale dhcpcd
entries

17 years agoDefault target should not be install ...
Roy Marples [Tue, 12 Aug 2008 22:51:33 +0000 (22:51 +0000)] 
Default target should not be install ...

17 years agontp.conf could have more than just servers, but DHCP only knows about servers. Soluti...
Roy Marples [Tue, 12 Aug 2008 20:46:42 +0000 (20:46 +0000)] 
ntp.conf could have more than just servers, but DHCP only knows about servers. Solution == use egrep to grab everything but servers and append to it :)

17 years agoDon't assume comments start with #
Roy Marples [Tue, 12 Aug 2008 20:44:42 +0000 (20:44 +0000)] 
Don't assume comments start with #

17 years agoDocument dhcpcd spining with dhcpcd -x.
Roy Marples [Tue, 12 Aug 2008 16:56:35 +0000 (16:56 +0000)] 
Document dhcpcd spining with dhcpcd -x.

17 years agoleased from should be time_t. Also, add boundtime for the last commit to work.
Roy Marples [Tue, 12 Aug 2008 16:52:56 +0000 (16:52 +0000)] 
leased from should be time_t. Also, add boundtime for the last commit to work.

17 years agoWhen requesting an address, probe for it first.
Roy Marples [Tue, 12 Aug 2008 16:45:12 +0000 (16:45 +0000)] 
When requesting an address, probe for it first.
If we have a monotonic clock, then remove time
taken from bound -> announced from the renewal time.

17 years agoNeed time.h for nanosleep.
Roy Marples [Tue, 12 Aug 2008 12:20:25 +0000 (12:20 +0000)] 
Need time.h for nanosleep.

17 years agoWe should ARP probe after discover.
Roy Marples [Tue, 12 Aug 2008 10:54:09 +0000 (10:54 +0000)] 
We should ARP probe after discover.

17 years agoSpin until dhcpcd exits (timeout 10 seconds) to avoid this race:- dhcpcd -x eth0...
Roy Marples [Tue, 12 Aug 2008 10:51:42 +0000 (10:51 +0000)] 
Spin until dhcpcd exits (timeout 10 seconds) to avoid this race:- dhcpcd -x eth0; dhcpcd eth0

17 years agoRemove unused function.
Roy Marples [Tue, 12 Aug 2008 10:50:30 +0000 (10:50 +0000)] 
Remove unused function.

17 years agoRename exec_script to run_script. Split the exec/fork part to static exec_script...
Roy Marples [Mon, 11 Aug 2008 09:28:53 +0000 (09:28 +0000)] 
Rename exec_script to run_script. Split the exec/fork part to static exec_script. This allows us to use vfork and stop gcc complaining about exec stamping on the env variable.

17 years agoNo longer need these.
Roy Marples [Mon, 11 Aug 2008 09:21:07 +0000 (09:21 +0000)] 
No longer need these.

17 years agoRemove loads of code specific to fork()less systems. dhcpcd no longer backgrounds...
Roy Marples [Mon, 11 Aug 2008 08:32:52 +0000 (08:32 +0000)] 
Remove loads of code specific to fork()less systems. dhcpcd no longer backgrounds on these systems, but is a lot lighter.

17 years agoDHCP_option -> DHO_option.
Roy Marples [Fri, 8 Aug 2008 17:55:48 +0000 (17:55 +0000)] 
DHCP_option -> DHO_option.

17 years agoAllow FQDN to be decoded to userland. Also, don't exclude hostname when sending FQDN.
Roy Marples [Fri, 8 Aug 2008 17:45:09 +0000 (17:45 +0000)] 
Allow FQDN to be decoded to userland. Also, don't exclude hostname when sending FQDN.

17 years agoWe should not make any restrictions on hostname. RFC2131 says that hostname field...
Roy Marples [Fri, 8 Aug 2008 13:47:57 +0000 (13:47 +0000)] 
We should not make any restrictions on hostname. RFC2131 says that hostname field *could* be fully or partially qualified.

17 years agoEnsure that hostname does not begin with a .
Roy Marples [Fri, 8 Aug 2008 12:26:05 +0000 (12:26 +0000)] 
Ensure that hostname does not begin with a .

17 years agoSkip the trailing . if it exists on the FQDN.
Roy Marples [Fri, 8 Aug 2008 11:31:19 +0000 (11:31 +0000)] 
Skip the trailing . if it exists on the FQDN.

17 years agoHeh, need to reserve space for FQDN option length also.
Roy Marples [Thu, 7 Aug 2008 11:45:29 +0000 (11:45 +0000)] 
Heh, need to reserve space for FQDN option length also.

17 years agoWe need to reserve a byte for initial length also.
Roy Marples [Thu, 7 Aug 2008 11:42:14 +0000 (11:42 +0000)] 
We need to reserve a byte for initial length also.

17 years agoNote that we encode the hostname according to RFC1035. As such, we can't use the...
Roy Marples [Thu, 7 Aug 2008 10:15:15 +0000 (10:15 +0000)] 
Note that we encode the hostname according to RFC1035. As such, we can't use the system defined MAX hostname length.

17 years agoUse full dates.
Roy Marples [Thu, 7 Aug 2008 10:04:16 +0000 (10:04 +0000)] 
Use full dates.

17 years agoTurns out my encoding was correct after all :)
Roy Marples [Thu, 7 Aug 2008 09:45:41 +0000 (09:45 +0000)] 
Turns out my encoding was correct after all :)
I've now split it out into it's own function for easier maintenance though.

17 years agoRevert FQDN to ASCII encoding as I cannot find out what RFC4702 really means for...
Roy Marples [Wed, 6 Aug 2008 22:12:37 +0000 (22:12 +0000)] 
Revert FQDN to ASCII encoding as I cannot find out what RFC4702 really means for encoding :/

17 years agoAttempt to fix FQDN encoding.
Roy Marples [Wed, 6 Aug 2008 21:37:34 +0000 (21:37 +0000)] 
Attempt to fix FQDN encoding.

17 years agoFix enum name
Roy Marples [Wed, 6 Aug 2008 17:31:04 +0000 (17:31 +0000)] 
Fix enum name

17 years agoRemove pointless log message.
Roy Marples [Wed, 6 Aug 2008 12:23:24 +0000 (12:23 +0000)] 
Remove pointless log message.

17 years agoDon't reset the counters unless we should. dhcpcd should now be fully conformant...
Roy Marples [Wed, 6 Aug 2008 09:32:58 +0000 (09:32 +0000)] 
Don't reset the counters unless we should. dhcpcd should now be fully conformant to RFC2131 and RFC3927 timings.

17 years agoAllow disable for fqdn option so command line can override config.
Roy Marples [Wed, 6 Aug 2008 08:31:20 +0000 (08:31 +0000)] 
Allow disable for fqdn option so command line can override config.

17 years agoRemove the MINIMAL define.
Roy Marples [Wed, 6 Aug 2008 08:28:43 +0000 (08:28 +0000)] 
Remove the MINIMAL define.

17 years agoFix comment.
Roy Marples [Tue, 5 Aug 2008 22:07:08 +0000 (22:07 +0000)] 
Fix comment.

17 years agoPut options in correct order.
Roy Marples [Tue, 5 Aug 2008 22:06:45 +0000 (22:06 +0000)] 
Put options in correct order.

17 years agoUse correct hostname length.
Roy Marples [Tue, 5 Aug 2008 22:06:11 +0000 (22:06 +0000)] 
Use correct hostname length.

17 years agoRespect hostname length.
Roy Marples [Tue, 5 Aug 2008 22:04:34 +0000 (22:04 +0000)] 
Respect hostname length.

17 years agoTurns out that POSIX only requires 31 days max for select. Linux has a hard limit...
Roy Marples [Sat, 2 Aug 2008 22:56:42 +0000 (22:56 +0000)] 
Turns out that POSIX only requires 31 days max for select. Linux has a hard limit which is hard to work out, so we now use a poll loop again with decreasing timers.

17 years agoFix compile on Darwin.
Roy Marples [Sat, 2 Aug 2008 19:59:13 +0000 (19:59 +0000)] 
Fix compile on Darwin.

17 years agoFix dhcp message logging.
Roy Marples [Fri, 1 Aug 2008 17:42:38 +0000 (17:42 +0000)] 
Fix dhcp message logging.

17 years agoAdd support for mach_absolute_time if on Darwin as that platform does not have clock_...
Roy Marples [Fri, 1 Aug 2008 14:11:33 +0000 (14:11 +0000)] 
Add support for mach_absolute_time if on Darwin as that platform does not have clock_gettime. I cannot test this myself, so it may have bugs or not compile.

17 years agoBrute force detection of monotonic clock as sysconf is unreliable. Instead rely on...
Roy Marples [Fri, 1 Aug 2008 13:15:11 +0000 (13:15 +0000)] 
Brute force detection of monotonic clock as sysconf is unreliable. Instead rely on clock_gettime failing gracefully with an invalid clockid (which it should do).

17 years agoDon't bother waiting on a negative timeout and fix poll -> select error message.
Roy Marples [Fri, 1 Aug 2008 10:22:44 +0000 (10:22 +0000)] 
Don't bother waiting on a negative timeout and fix poll -> select error message.

17 years agoTweak README about monotonic, and improve warning message.
Roy Marples [Fri, 1 Aug 2008 08:41:25 +0000 (08:41 +0000)] 
Tweak README about monotonic, and improve warning message.

17 years agoselect and poll cannot be trusted to respect the timeout - sometimes they timeout...
Roy Marples [Thu, 31 Jul 2008 23:46:37 +0000 (23:46 +0000)] 
select and poll cannot be trusted to respect the timeout - sometimes they timeout just before the value. As such, the timers now decrease instead of being set times to timeout. This makes the code a bit lighter as well - the side effect is we've bloated the logger calls with timeouts as we can no longer log the waiting time in wait_for_fd.

17 years agoDocument monotonic clock warning and solution.
Roy Marples [Thu, 31 Jul 2008 23:44:08 +0000 (23:44 +0000)] 
Document monotonic clock warning and solution.

17 years agoclock_monotonic now is 0 or 1 depending on if the clock is monotonic. Also, systems...
Roy Marples [Thu, 31 Jul 2008 23:43:37 +0000 (23:43 +0000)] 
clock_monotonic now is 0 or 1 depending on if the clock is monotonic. Also, systems that have headers for monotonic but do not claim support now warn about this. You can build dhcpcd to force a monotonic clock.

17 years agoAnother usec fix.
Roy Marples [Thu, 31 Jul 2008 15:44:07 +0000 (15:44 +0000)] 
Another usec fix.

17 years agoIt looks impossible to send our information to NM using DBus, so just call the NM...
Roy Marples [Thu, 31 Jul 2008 13:39:40 +0000 (13:39 +0000)] 
It looks impossible to send our information to NM using DBus, so just call the NM dispatcher directly.

17 years agofd_set is not a struct.
Roy Marples [Thu, 31 Jul 2008 12:26:45 +0000 (12:26 +0000)] 
fd_set is not a struct.

17 years agoAlways restart ntp even config hasn't changed as it could have been configured correc...
Roy Marples [Thu, 31 Jul 2008 12:20:26 +0000 (12:20 +0000)] 
Always restart ntp even config hasn't changed as it could have been configured correctly and started before dhcpcd, which means it won't actually be talking to the ntp server we want.

17 years agoDon't lookup the hostname if we don't have an ip address (INFORM).
Roy Marples [Thu, 31 Jul 2008 12:19:14 +0000 (12:19 +0000)] 
Don't lookup the hostname if we don't have an ip address (INFORM).

17 years agoClear stop timer for INFORM.
Roy Marples [Thu, 31 Jul 2008 12:18:37 +0000 (12:18 +0000)] 
Clear stop timer for INFORM.

17 years agoPrefer signal to poll so we avoid any possibilty of a timeval -> int/msecs overflow...
Roy Marples [Thu, 31 Jul 2008 09:30:42 +0000 (09:30 +0000)] 
Prefer signal to poll so we avoid any possibilty of a timeval -> int/msecs overflow. We could of course loop msecs / INT_MAX times, but it then gets messy. It also saves around 200 bytes of binary size :)

17 years agostderr should be unbuffered by default.
Roy Marples [Wed, 30 Jul 2008 21:27:48 +0000 (21:27 +0000)] 
stderr should be unbuffered by default.

17 years agoAdd correct time bit.
Roy Marples [Wed, 30 Jul 2008 20:15:49 +0000 (20:15 +0000)] 
Add correct time bit.

17 years agoDon't log spam carrier or infinite.
Roy Marples [Wed, 30 Jul 2008 14:28:53 +0000 (14:28 +0000)] 
Don't log spam carrier or infinite.

17 years agoPlug a leak.
Roy Marples [Wed, 30 Jul 2008 11:11:08 +0000 (11:11 +0000)] 
Plug a leak.

17 years agoWe should bind to the interface if we can - for the case where we renew and there...
Roy Marples [Wed, 30 Jul 2008 11:05:45 +0000 (11:05 +0000)] 
We should bind to the interface if we can - for the case where we renew and there are two interfaces on the same subnet and the default subnet route goes via the wrong interface.

17 years agoFix background for forkless systems.
Roy Marples [Tue, 29 Jul 2008 16:09:56 +0000 (16:09 +0000)] 
Fix background for forkless systems.

17 years agoUse setlinebuf() at startup instead of calling fflush() for each logger call.
Roy Marples [Mon, 28 Jul 2008 15:43:38 +0000 (15:43 +0000)] 
Use setlinebuf() at startup instead of calling fflush() for each logger call.

17 years agoRelease dhcpcd-4.0.0-rc4
Roy Marples [Mon, 28 Jul 2008 14:35:20 +0000 (14:35 +0000)] 
Release dhcpcd-4.0.0-rc4

17 years agoreturns
Roy Marples [Mon, 28 Jul 2008 14:01:17 +0000 (14:01 +0000)] 
returns

17 years agoCheck chaddr matches our hwaddr if it fits.
Roy Marples [Mon, 28 Jul 2008 13:39:57 +0000 (13:39 +0000)] 
Check chaddr matches our hwaddr if it fits.

17 years agoDon't use the word will so much.
Roy Marples [Mon, 28 Jul 2008 13:28:08 +0000 (13:28 +0000)] 
Don't use the word will so much.

17 years agoAdd -X, --blacklist option to reject DHCP messages with a matching serverid.
Roy Marples [Mon, 28 Jul 2008 13:21:47 +0000 (13:21 +0000)] 
Add -X, --blacklist option to reject DHCP messages with a matching serverid.