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

17 years agoTart up the mandoc a little, thanks to Thomas Klausner.
Roy Marples [Mon, 28 Jul 2008 12:02:24 +0000 (12:02 +0000)] 
Tart up the mandoc a little, thanks to Thomas Klausner.

17 years agoFix --noipv4ll option from timing out right away.
Roy Marples [Mon, 28 Jul 2008 09:17:07 +0000 (09:17 +0000)] 
Fix --noipv4ll option from timing out right away.

17 years agoInherit DBDIR and LIBEXECDIR from the env.
Roy Marples [Sun, 27 Jul 2008 18:04:44 +0000 (18:04 +0000)] 
Inherit DBDIR and LIBEXECDIR from the env.

17 years agoMisc fixes and clarify why inform should have a CIDR.
Roy Marples [Sun, 27 Jul 2008 15:36:40 +0000 (15:36 +0000)] 
Misc fixes and clarify why inform should have a CIDR.

17 years agoRelease dhcpcd-4.0.0-rc3
Roy Marples [Sun, 27 Jul 2008 10:29:12 +0000 (10:29 +0000)] 
Release dhcpcd-4.0.0-rc3

17 years agoDon't set a sop timeout when bound to an infinite lease after announcing.
Roy Marples [Sun, 27 Jul 2008 10:17:36 +0000 (10:17 +0000)] 
Don't set a sop timeout when bound to an infinite lease after announcing.

17 years agoFix sign error.
Roy Marples [Sat, 26 Jul 2008 12:29:02 +0000 (12:29 +0000)] 
Fix sign error.

17 years agoSave some bytes by not using timeradd so much.
Roy Marples [Sat, 26 Jul 2008 11:40:39 +0000 (11:40 +0000)] 
Save some bytes by not using timeradd so much.

17 years agoEnsure can handle our lease time.
Roy Marples [Sat, 26 Jul 2008 09:28:16 +0000 (09:28 +0000)] 
Ensure can handle our lease time.

17 years agoMove the seconds waiting calc into the if where it's needed.
Roy Marples [Sat, 26 Jul 2008 07:32:44 +0000 (07:32 +0000)] 
Move the seconds waiting calc into the if where it's needed.

17 years agoReport more accurate seconds.
Roy Marples [Fri, 25 Jul 2008 20:35:41 +0000 (20:35 +0000)] 
Report more accurate seconds.

17 years agoFix signal handling and ARP announcing.
Roy Marples [Thu, 24 Jul 2008 21:51:11 +0000 (21:51 +0000)] 
Fix signal handling and ARP announcing.

17 years agoFix breakage caused by last patch.
Roy Marples [Thu, 24 Jul 2008 15:50:19 +0000 (15:50 +0000)] 
Fix breakage caused by last patch.

17 years agoNormalise tv_usecs. Also, send the fd ready back to the main loop so we don't have...
Roy Marples [Thu, 24 Jul 2008 15:09:33 +0000 (15:09 +0000)] 
Normalise tv_usecs. Also, send the fd ready back to the main loop so we don't have to re-poll each fd. Saves bytes and is more efficient.

17 years agoget_time -> clock_monotonic to be more descriptive.
Roy Marples [Thu, 24 Jul 2008 14:30:36 +0000 (14:30 +0000)] 
get_time -> clock_monotonic to be more descriptive.

17 years agoRemove #ifdefs to disable specific bits of code. We now build everything - we're...
Roy Marples [Wed, 23 Jul 2008 17:06:42 +0000 (17:06 +0000)] 
Remove #ifdefs to disable specific bits of code. We now build everything - we're small enough :)

17 years agoRelease dhcpcd-4.0.0-rc2
Roy Marples [Wed, 23 Jul 2008 16:08:27 +0000 (16:08 +0000)] 
Release dhcpcd-4.0.0-rc2

17 years agoIf we fail to obtain an IPv4LL address, drop back to search for a DHCP lease.
Roy Marples [Wed, 23 Jul 2008 14:21:29 +0000 (14:21 +0000)] 
If we fail to obtain an IPv4LL address, drop back to search for a DHCP lease.

17 years agoDon't flap the carrier needlessly.
Roy Marples [Wed, 23 Jul 2008 14:14:53 +0000 (14:14 +0000)] 
Don't flap the carrier needlessly.

17 years agoFix mini timeouts and starting ipv4ll when link is down and we try to renew a lease.
Roy Marples [Wed, 23 Jul 2008 10:32:00 +0000 (10:32 +0000)] 
Fix mini timeouts and starting ipv4ll when link is down and we try to renew a lease.

17 years agoTypo
Roy Marples [Wed, 23 Jul 2008 08:45:04 +0000 (08:45 +0000)] 
Typo

17 years agoMinor updates.
Roy Marples [Tue, 22 Jul 2008 12:49:26 +0000 (12:49 +0000)] 
Minor updates.

17 years agoRelease dhcpcd-4.0.0-rc1
Roy Marples [Tue, 22 Jul 2008 09:10:55 +0000 (09:10 +0000)] 
Release dhcpcd-4.0.0-rc1

17 years agoAlways expire lease on probe failure. We should do this as the LAN we hot swap too...
Roy Marples [Tue, 22 Jul 2008 06:58:11 +0000 (06:58 +0000)] 
Always expire lease on probe failure. We should do this as the LAN we hot swap too could deny our IPv4LL probes are a while and this is safer.

17 years agoFix valgrind errors, and report correct type.
Roy Marples [Mon, 21 Jul 2008 21:48:17 +0000 (21:48 +0000)] 
Fix valgrind errors, and report correct type.

17 years agoEXPIRE on NAK and fix valgrind errors.
Roy Marples [Mon, 21 Jul 2008 21:30:48 +0000 (21:30 +0000)] 
EXPIRE on NAK and fix valgrind errors.

17 years agoMore timer fixes. Also, when a handle function returns 1, don't wait for a packet...
Roy Marples [Mon, 21 Jul 2008 16:21:53 +0000 (16:21 +0000)] 
More timer fixes. Also, when a handle function returns 1, don't wait for a packet as we should drop through to the handle_timeout. Makes the code a bit cleaner.

17 years agoBetter to say which OS's have closefrom.
Roy Marples [Mon, 21 Jul 2008 14:30:07 +0000 (14:30 +0000)] 
Better to say which OS's have closefrom.

17 years agoDarwin uses --rpath instead of -Wl,-rpath= - bummer.
Roy Marples [Mon, 21 Jul 2008 14:24:18 +0000 (14:24 +0000)] 
Darwin uses --rpath instead of -Wl,-rpath= - bummer.

17 years agoOK, the loop was caused by the initial carrier timeout. Also, always log carrier...
Roy Marples [Mon, 21 Jul 2008 14:05:35 +0000 (14:05 +0000)] 
OK, the loop was caused by the initial carrier timeout. Also, always log carrier waiting, but don't spam the console when backgrounding.

17 years agoAttempt to fix dhcpcd going into a tight infinite loop after getting an IPv4LL address.
Roy Marples [Mon, 21 Jul 2008 13:20:59 +0000 (13:20 +0000)] 
Attempt to fix dhcpcd going into a tight infinite loop after getting an IPv4LL address.

17 years agoFix compile on OSX.
Roy Marples [Mon, 21 Jul 2008 10:32:16 +0000 (10:32 +0000)] 
Fix compile on OSX.

17 years agoDon't log waiting for carrier when backgrounding.
Roy Marples [Mon, 21 Jul 2008 06:17:08 +0000 (06:17 +0000)] 
Don't log waiting for carrier when backgrounding.

17 years agoWe should timeout when in background for IPv4LL.
Roy Marples [Mon, 21 Jul 2008 06:12:33 +0000 (06:12 +0000)] 
We should timeout when in background for IPv4LL.

17 years agoActually no, just the probing state. We should defend our announces :)
Roy Marples [Mon, 21 Jul 2008 06:02:28 +0000 (06:02 +0000)] 
Actually no, just the probing state. We should defend our announces :)

17 years agoWe should only defend when not in the probing or announcing state.
Roy Marples [Mon, 21 Jul 2008 05:40:24 +0000 (05:40 +0000)] 
We should only defend when not in the probing or announcing state.

17 years agoRemove the fork() test as compile hosts will normally have it, making it redundant.
Roy Marples [Sun, 20 Jul 2008 19:33:27 +0000 (19:33 +0000)] 
Remove the fork() test as compile hosts will normally have it, making it redundant.

17 years agofork()less fixes.
Roy Marples [Sun, 20 Jul 2008 16:21:53 +0000 (16:21 +0000)] 
fork()less fixes.

17 years agoDon't re-up the interface - user may have brought it down.
Roy Marples [Sun, 20 Jul 2008 15:56:01 +0000 (15:56 +0000)] 
Don't re-up the interface - user may have brought it down.

17 years agoQuick fix.
Roy Marples [Sat, 19 Jul 2008 20:52:17 +0000 (20:52 +0000)] 
Quick fix.

17 years agoStyle.
Roy Marples [Sat, 19 Jul 2008 20:11:03 +0000 (20:11 +0000)] 
Style.

17 years agoFix the timeouts some more - complicated stuff!
Roy Marples [Sat, 19 Jul 2008 20:04:27 +0000 (20:04 +0000)] 
Fix the timeouts some more - complicated stuff!

17 years agoFix IPv4LL when backgrounding.
Roy Marples [Sat, 19 Jul 2008 17:06:54 +0000 (17:06 +0000)] 
Fix IPv4LL when backgrounding.

17 years agoNo need to check for this error code.
Roy Marples [Sat, 19 Jul 2008 14:14:40 +0000 (14:14 +0000)] 
No need to check for this error code.

17 years agoWhen daemonised, don't set bound state.
Roy Marples [Sat, 19 Jul 2008 14:04:36 +0000 (14:04 +0000)] 
When daemonised, don't set bound state.

17 years agoDon't report deleteing a non existant address on FreeBSD.
Roy Marples [Sat, 19 Jul 2008 14:04:18 +0000 (14:04 +0000)] 
Don't report deleteing a non existant address on FreeBSD.

17 years agoFix IPv4LL
Roy Marples [Fri, 18 Jul 2008 23:31:34 +0000 (23:31 +0000)] 
Fix IPv4LL

17 years agoRework the state engine around the timers better. timeout is now used for re-transmis...
Roy Marples [Fri, 18 Jul 2008 22:00:18 +0000 (22:00 +0000)] 
Rework the state engine around the timers better. timeout is now used for re-transmissions and stop is used to change state.

17 years agoAdd log_dhcp so we log server ip and name if available. Saves a few bytes.
Roy Marples [Fri, 18 Jul 2008 16:42:47 +0000 (16:42 +0000)] 
Add log_dhcp so we log server ip and name if available. Saves a few bytes.

17 years agoTry and stop a flapping timeout.
Roy Marples [Fri, 18 Jul 2008 13:43:25 +0000 (13:43 +0000)] 
Try and stop a flapping timeout.

17 years agoWe could return from a few more states here.
Roy Marples [Fri, 18 Jul 2008 12:23:45 +0000 (12:23 +0000)] 
We could return from a few more states here.

17 years agoAdd an exit timer so that carrier changing does not cause timeouts to flap. Also...
Roy Marples [Fri, 18 Jul 2008 12:06:35 +0000 (12:06 +0000)] 
Add an exit timer so that carrier changing does not cause timeouts to flap. Also, fix renewals entering the server address.