]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Sun, 13 Apr 2008 15:29:09 +0000 (15:29 +0000)]
We should end options correctly.
Roy Marples [Sun, 13 Apr 2008 13:17:03 +0000 (13:17 +0000)]
We now use either dig or host to lookup the hostname in DNS again.
Roy Marples [Sun, 13 Apr 2008 11:49:19 +0000 (11:49 +0000)]
Remove the bit about init detection as it's no longer used.
Roy Marples [Sun, 13 Apr 2008 11:27:41 +0000 (11:27 +0000)]
As we're only dealing with dhcpcd.sh now, the exec_cmd function doesn't need to be so complex.
Roy Marples [Sat, 12 Apr 2008 23:58:03 +0000 (23:58 +0000)]
As we're not looking up the hostname anymore, remove reference from manual.
Roy Marples [Sat, 12 Apr 2008 23:15:22 +0000 (23:15 +0000)]
And read only ;)
Roy Marples [Sat, 12 Apr 2008 23:13:15 +0000 (23:13 +0000)]
The lease file should only be able to be read by the user than runs dhcpcd.
Roy Marples [Sat, 12 Apr 2008 23:00:23 +0000 (23:00 +0000)]
Move configuration file setup to dhcpcd.sh so that it's possible for the user to change more easily. We now have enter/exit hooks similar to dhclient to make things even easier for the user. At this time, we are still 100% commandline compatible. However, we have lost the feature to lookup hostnames.
Roy Marples [Sat, 12 Apr 2008 03:54:17 +0000 (03:54 +0000)]
Fix INFORM support a little.
Roy Marples [Fri, 11 Apr 2008 16:23:31 +0000 (16:23 +0000)]
Punt unused file.
Roy Marples [Fri, 11 Apr 2008 16:14:55 +0000 (16:14 +0000)]
Normally I hate massive code drops, but heh.
The code has been drastically re-arranged.
Instead of populating a custom structure while parsing dhcp messages, we now pluck what we need right out of the message itself. We have custom functions and a lookup table to make this really easy.
This makes us more like dhclient and udhcpc, and will enable us to easily add (and remove!) more dhcp options without having to actually change the code (much).
We now store the real dhcp message we got in /var/db/dhcpcd-$iface.lease, the mtime of the file being used as when we got the lease. This file is read in when re-using an old lease instead of parsing the .info file.
The benefit of all of this means that we're actually ~15k smaller when compiled with the same features.
This has been tested for quite some time, and I'm pretty sure most bugs with the 3.2 branch have been fixed whilst making this. Right now, we are 99% command line compatible with the 3.2 branch.
Roy Marples [Mon, 31 Mar 2008 10:23:59 +0000 (10:23 +0000)]
read(2) works on ssize_t so we should use this rather than size_t for our buffers. A DHCP or ARP packet still easily fits into this.
Roy Marples [Sun, 30 Mar 2008 08:26:34 +0000 (08:26 +0000)]
Pointless looping in bpf.packet, as pointed out by D. Young.
Roy Marples [Sun, 30 Mar 2008 08:07:37 +0000 (08:07 +0000)]
Use d_droute.
Roy Marples [Sat, 29 Mar 2008 19:14:52 +0000 (19:14 +0000)]
bitmask options should take less space than booleans.
Roy Marples [Sat, 29 Mar 2008 17:03:34 +0000 (17:03 +0000)]
strlcpy is more lightweight than memcpy.
Roy Marples [Sat, 29 Mar 2008 16:58:42 +0000 (16:58 +0000)]
Fix compile on NetBSD.
Roy Marples [Sat, 29 Mar 2008 16:50:18 +0000 (16:50 +0000)]
Remove all logging from if.c and into the proper bits.
Roy Marples [Sat, 29 Mar 2008 13:07:39 +0000 (13:07 +0000)]
Convert has_address into a macro.
Roy Marples [Sat, 29 Mar 2008 12:53:24 +0000 (12:53 +0000)]
flush_addresses can become a macro.
Roy Marples [Sat, 29 Mar 2008 11:41:00 +0000 (11:41 +0000)]
Save a few more bytes.
Roy Marples [Sat, 29 Mar 2008 11:36:43 +0000 (11:36 +0000)]
Move log_route to if.c
Roy Marples [Sat, 29 Mar 2008 09:48:57 +0000 (09:48 +0000)]
We need sys/stat.h on fbsd.
Roy Marples [Sat, 29 Mar 2008 08:40:55 +0000 (08:40 +0000)]
Rework our error handling code a little to save ~5k on x86_64
Roy Marples [Fri, 28 Mar 2008 17:56:45 +0000 (17:56 +0000)]
Fix compile on Linux.
Roy Marples [Fri, 28 Mar 2008 15:07:23 +0000 (15:07 +0000)]
It's more proper to use ~0U here.
Roy Marples [Fri, 28 Mar 2008 13:16:04 +0000 (13:16 +0000)]
Install INFODIR in the Makefile to reduce the dhcpcd code size.
Roy Marples [Fri, 28 Mar 2008 12:39:53 +0000 (12:39 +0000)]
No need to create /etc
Roy Marples [Fri, 28 Mar 2008 12:19:49 +0000 (12:19 +0000)]
Use strlcpy here.
Roy Marples [Fri, 28 Mar 2008 12:10:12 +0000 (12:10 +0000)]
Don't bother compiling these if undefined.
Roy Marples [Fri, 28 Mar 2008 11:54:29 +0000 (11:54 +0000)]
Use the close_on_exec function here.
Roy Marples [Fri, 28 Mar 2008 11:45:34 +0000 (11:45 +0000)]
It appears that some DHCP servers don't reply to a DISCOVER if we just have DNS_SERVER in the parameter list, so just use the whole list all the time.
Roy Marples [Thu, 27 Mar 2008 20:23:34 +0000 (20:23 +0000)]
Fix compile on fbsd-6.2
Roy Marples [Thu, 27 Mar 2008 20:10:31 +0000 (20:10 +0000)]
If not Linux then assume BSD.
Roy Marples [Tue, 25 Mar 2008 08:36:28 +0000 (08:36 +0000)]
Fix compiler warnings.
Roy Marples [Mon, 24 Mar 2008 20:09:30 +0000 (20:09 +0000)]
Add alternative building method to save around 500 bytes.
Roy Marples [Mon, 24 Mar 2008 20:08:51 +0000 (20:08 +0000)]
Use functions over bloaty macros to save a few bytes.
Roy Marples [Mon, 24 Mar 2008 01:45:37 +0000 (01:45 +0000)]
Fix compile on BSD.
Roy Marples [Mon, 24 Mar 2008 01:29:33 +0000 (01:29 +0000)]
Split interface and socket out into OS bpf, if-bsd and if-linux.
Roy Marples [Thu, 20 Mar 2008 17:03:55 +0000 (17:03 +0000)]
Fix compile on NetBSD
Roy Marples [Thu, 20 Mar 2008 17:00:11 +0000 (17:00 +0000)]
Remove uneeded structs.
Roy Marples [Thu, 20 Mar 2008 16:47:51 +0000 (16:47 +0000)]
Change code style to match the BSDs in the hope the might adpot it instead of dhclient.
Roy Marples [Sun, 16 Mar 2008 08:22:01 +0000 (08:22 +0000)]
Work with zerolength options again.
Roy Marples [Wed, 5 Mar 2008 12:34:29 +0000 (12:34 +0000)]
Include our own queue.h only for Linux systems.
Roy Marples [Tue, 4 Mar 2008 11:44:44 +0000 (11:44 +0000)]
Import STAIL_QUEUE from FreeBSD headers as not all libc's we support provide it.
Roy Marples [Tue, 4 Mar 2008 11:24:28 +0000 (11:24 +0000)]
Add back asm/types.h direct include for crappy 2.4 linux headers.
Roy Marples [Tue, 4 Mar 2008 11:05:23 +0000 (11:05 +0000)]
Allow --fqdn to work without an option, defaulting to both.
Roy Marples [Mon, 25 Feb 2008 08:28:19 +0000 (08:28 +0000)]
Release dhcpcd-3.2.3
Roy Marples [Sun, 24 Feb 2008 10:56:21 +0000 (10:56 +0000)]
NIS could just be a domain without addresses.
Roy Marples [Sat, 23 Feb 2008 23:12:54 +0000 (23:12 +0000)]
Fix hostname lookup, #31
Roy Marples [Sat, 23 Feb 2008 23:12:09 +0000 (23:12 +0000)]
Clean up some valgrind errors.
Roy Marples [Fri, 22 Feb 2008 14:53:02 +0000 (14:53 +0000)]
As we don't use the udp socket, set the recieve buffer to 1.
Roy Marples [Fri, 22 Feb 2008 14:35:27 +0000 (14:35 +0000)]
Fix building on GNU/kFreeBSD, Debian #467005
Roy Marples [Fri, 22 Feb 2008 11:45:18 +0000 (11:45 +0000)]
PCC compiler fixes.
Roy Marples [Fri, 22 Feb 2008 10:11:21 +0000 (10:11 +0000)]
Always open UDP port for DHCP client t avoid more ICMP nastyness.
Roy Marples [Fri, 22 Feb 2008 09:29:40 +0000 (09:29 +0000)]
ifreqs could have more than structs larger than sockaddr, so use the union size.
Roy Marples [Thu, 21 Feb 2008 20:55:27 +0000 (20:55 +0000)]
Style.
Roy Marples [Thu, 21 Feb 2008 20:50:01 +0000 (20:50 +0000)]
Fix rebinding.
Roy Marples [Thu, 21 Feb 2008 17:59:15 +0000 (17:59 +0000)]
Be more RFC conformant regarding sending server id.
Roy Marples [Thu, 21 Feb 2008 16:45:01 +0000 (16:45 +0000)]
Add a listening port for linux for when we have configured an address and need to renew. Otherwise linux likes to generate an ICMP destination unreachable port unreachable message, which is probably a linux bug as we have obviously read the packet correctly through our packet filter.
Roy Marples [Thu, 21 Feb 2008 16:35:59 +0000 (16:35 +0000)]
When renewing, talk to the server ip address.
Roy Marples [Thu, 21 Feb 2008 16:35:15 +0000 (16:35 +0000)]
Fix mode of pidfile so any user can read it.
Roy Marples [Thu, 21 Feb 2008 07:45:02 +0000 (07:45 +0000)]
Fix compile on NOMMU systems.
Roy Marples [Wed, 20 Feb 2008 19:09:30 +0000 (19:09 +0000)]
Bail out of sys/queue.h lacks STAILQ
Roy Marples [Wed, 20 Feb 2008 17:49:51 +0000 (17:49 +0000)]
Support the PCC compiler.
Roy Marples [Wed, 20 Feb 2008 17:13:12 +0000 (17:13 +0000)]
Quickly fix a valgrind error.
Roy Marples [Wed, 20 Feb 2008 17:09:14 +0000 (17:09 +0000)]
Release dhcpcd-3.2.2
Roy Marples [Wed, 20 Feb 2008 17:04:56 +0000 (17:04 +0000)]
Use tailq from queue.h instead of rolling our down linked lists.
Roy Marples [Wed, 20 Feb 2008 12:15:13 +0000 (12:15 +0000)]
Add a comment about older linux headers and -std=c99.
Roy Marples [Wed, 20 Feb 2008 10:35:12 +0000 (10:35 +0000)]
Don't include -pipe by default.
Roy Marples [Wed, 20 Feb 2008 10:12:40 +0000 (10:12 +0000)]
Test each CC flag we want to set so we will work on other compilers such as pcc when it matures a little.
Roy Marples [Tue, 19 Feb 2008 18:31:37 +0000 (18:31 +0000)]
Typo.
Roy Marples [Tue, 19 Feb 2008 18:30:16 +0000 (18:30 +0000)]
Remove hardcoded defines for linux and add a nasty hackaround for glibc.
Roy Marples [Tue, 19 Feb 2008 17:43:39 +0000 (17:43 +0000)]
Fix compile.
Roy Marples [Tue, 19 Feb 2008 17:35:31 +0000 (17:35 +0000)]
Linux-2.6.23 finally supports -std=c99 for asm/types.h, included by headers we include.
Roy Marples [Tue, 19 Feb 2008 09:57:27 +0000 (09:57 +0000)]
Add comments about interupts and stop polling for events we ignore.
Roy Marples [Mon, 11 Feb 2008 21:43:34 +0000 (21:43 +0000)]
When polling and interupted, continue as the signal will then be in our pipe.
Roy Marples [Mon, 11 Feb 2008 21:42:53 +0000 (21:42 +0000)]
Fix compile warning for new netlink callback header.
Roy Marples [Sun, 10 Feb 2008 23:40:24 +0000 (23:40 +0000)]
Fix poll timeout.
Roy Marples [Sun, 10 Feb 2008 23:30:08 +0000 (23:30 +0000)]
Fix compile on NetBSD.
Roy Marples [Sun, 10 Feb 2008 23:08:34 +0000 (23:08 +0000)]
Just warn when running as non root.
Roy Marples [Sun, 10 Feb 2008 23:01:44 +0000 (23:01 +0000)]
Replace select with poll and nanosleep.
Roy Marples [Sat, 9 Feb 2008 21:58:05 +0000 (21:58 +0000)]
We should only have one bit of code to mark sockets close_on_exec.
Roy Marples [Wed, 6 Feb 2008 10:18:03 +0000 (10:18 +0000)]
Rename getline to get_line so we don't conflict with crappy GNU headers that wrongly expose getline when _GNU_SOURCE isn't set. Bug #17.
Roy Marples [Tue, 5 Feb 2008 21:38:00 +0000 (21:38 +0000)]
Allow hardware type to be specified in the ClientID. This is needed, as the ethernet length matches other lengths.
Roy Marples [Sun, 3 Feb 2008 22:35:48 +0000 (22:35 +0000)]
We should block and reset our signals when daemonising also.
Roy Marples [Sat, 2 Feb 2008 21:56:12 +0000 (21:56 +0000)]
Revert posix_spawn as it seems only glibc supports it for us right now. Hope that libc is tolerant to changing signals inside a vfork if we put them back afterwards in the parent.
Roy Marples [Sat, 2 Feb 2008 19:17:08 +0000 (19:17 +0000)]
Block signals to avoid potential signal racing on BSD using fork.
Roy Marples [Sat, 2 Feb 2008 18:08:49 +0000 (18:08 +0000)]
Of course, BSD systems don't have posix_spawn yet :/
Roy Marples [Sat, 2 Feb 2008 17:28:22 +0000 (17:28 +0000)]
Use posix_spawn instead of vfork to avoid signal races.
Roy Marples [Thu, 31 Jan 2008 14:18:30 +0000 (14:18 +0000)]
Fix adding routes on BSD.
Roy Marples [Thu, 31 Jan 2008 11:19:17 +0000 (11:19 +0000)]
Move clientid generation to client.c and put it on the interface object inplace of duid. Always save the ClientID as a hex string. This reduces our binary size.
Roy Marples [Wed, 30 Jan 2008 10:08:59 +0000 (10:08 +0000)]
Specify install modes for all our files.
Roy Marples [Wed, 30 Jan 2008 09:42:20 +0000 (09:42 +0000)]
BPF documentation says use +, so lets do that.
Roy Marples [Tue, 29 Jan 2008 11:26:24 +0000 (11:26 +0000)]
Release dhcpcd-3.2.1
Roy Marples [Tue, 29 Jan 2008 11:20:55 +0000 (11:20 +0000)]
Update comment style.
Roy Marples [Tue, 29 Jan 2008 11:12:59 +0000 (11:12 +0000)]
Re add the code to re-send message now - last time sent >= TIMOUT_MINI just incase.
Roy Marples [Tue, 29 Jan 2008 10:53:59 +0000 (10:53 +0000)]
Better to use the size of the packet.
Roy Marples [Tue, 29 Jan 2008 10:46:54 +0000 (10:46 +0000)]
Man page updates.
Roy Marples [Mon, 28 Jan 2008 17:47:54 +0000 (17:47 +0000)]
Use sizeof with the variable, not the declaration more.