]>
git.ipfire.org Git - thirdparty/dhcpcd.git/log
Roy Marples [Mon, 21 Apr 2008 10:43:08 +0000 (10:43 +0000)]
Merge branch 'master' of git.marples.name:/var/git/dhcpcd
Roy Marples [Mon, 21 Apr 2008 09:53:18 +0000 (09:53 +0000)]
Trim trailing whitespace.
Roy Marples [Mon, 21 Apr 2008 09:40:14 +0000 (09:40 +0000)]
We should check for required arguments and strip leading whitespace.
Roy Marples [Mon, 21 Apr 2008 09:31:34 +0000 (09:31 +0000)]
Fix a compile warning.
Roy Marples [Sun, 20 Apr 2008 19:02:19 +0000 (19:02 +0000)]
We should send packets to a specific IP over the udp socket so we don't broadcast on layer 2 and unicast on layer 3, #64.
Roy Marples [Sun, 20 Apr 2008 09:35:47 +0000 (09:35 +0000)]
Use a.b.c.d/e notation as this more fully represents the data.
Roy Marples [Sat, 19 Apr 2008 17:32:43 +0000 (17:32 +0000)]
Fix a signed issue.
Roy Marples [Sat, 19 Apr 2008 11:00:54 +0000 (11:00 +0000)]
Fix rfc3397 and rfc3442 decoding for dhcpcd.sh.
Roy Marples [Fri, 18 Apr 2008 23:23:00 +0000 (23:23 +0000)]
Add a note about how to enable deprecated commandline options.
Roy Marples [Fri, 18 Apr 2008 23:12:44 +0000 (23:12 +0000)]
dhcpcd can now read a basic config file! Add a default dhcpcd.conf and matching man page. Add dhcpcd.sh man page. dhcpcd can now report variables it can send to dhcpcd.sh as well.
Roy Marples [Thu, 17 Apr 2008 21:18:20 +0000 (21:18 +0000)]
Move the duid file to /etc/dhcpcd as it's really a config file. Also, rename hook dirs to dhcpcd- so they could be installed into /etc and not just /etc/dhcpcd.
Roy Marples [Thu, 17 Apr 2008 18:38:59 +0000 (18:38 +0000)]
Quiet OpenRC scripts.
Roy Marples [Thu, 17 Apr 2008 16:30:30 +0000 (16:30 +0000)]
Split ntp and ypbind into sample hook scripts. These are not installed by default.
Roy Marples [Thu, 17 Apr 2008 16:29:22 +0000 (16:29 +0000)]
Fix ntp and nis servers.
Roy Marples [Thu, 17 Apr 2008 10:08:48 +0000 (10:08 +0000)]
Specify char
Roy Marples [Thu, 17 Apr 2008 09:57:19 +0000 (09:57 +0000)]
Our ctype calls should always use unsigned.
Roy Marples [Thu, 17 Apr 2008 09:47:11 +0000 (09:47 +0000)]
If _PATH_BPF is set, open that instead of searching for a free BPF device.
Roy Marples [Wed, 16 Apr 2008 18:19:50 +0000 (18:19 +0000)]
Change SYSCONFDIR to /etc/dhcpcd as we'll probably be adding some kind of config file.
Roy Marples [Wed, 16 Apr 2008 13:50:44 +0000 (13:50 +0000)]
Fix compat - d'oh
Roy Marples [Wed, 16 Apr 2008 13:47:39 +0000 (13:47 +0000)]
Add dhcpcd-compat.sh, so that distros can make available old style variables.
Roy Marples [Wed, 16 Apr 2008 12:25:13 +0000 (12:25 +0000)]
Use correct mtu function.
Roy Marples [Wed, 16 Apr 2008 10:25:54 +0000 (10:25 +0000)]
Add dhcpcd.sh.in
Roy Marples [Wed, 16 Apr 2008 09:55:35 +0000 (09:55 +0000)]
Fix a few compile warnings.
Roy Marples [Wed, 16 Apr 2008 09:51:20 +0000 (09:51 +0000)]
Remove the .info file and now set environment vars in the same vein as dhclient. This allows similar scripts to be used.
Roy Marples [Mon, 14 Apr 2008 19:28:28 +0000 (19:28 +0000)]
Don't compare if file does not exist.
Roy Marples [Mon, 14 Apr 2008 19:24:23 +0000 (19:24 +0000)]
Support GNU style calling.
Roy Marples [Mon, 14 Apr 2008 18:50:48 +0000 (18:50 +0000)]
We should ARP by default.
Roy Marples [Mon, 14 Apr 2008 15:08:46 +0000 (15:08 +0000)]
Replace the clean_metas functions with a write_string function. The main difference is that we escape non ascii or printable chars and avoid mallocing.
Roy Marples [Mon, 14 Apr 2008 13:47:20 +0000 (13:47 +0000)]
Move MTU configuration to dhcpcd.sh. However, if the MTU is too small for dhcpcd, dhcpcd will increase it to the minimum.
Roy Marples [Mon, 14 Apr 2008 13:29:11 +0000 (13:29 +0000)]
Fix type for NetBIOS scope, and escape unknown options such as vendor extended options.
Roy Marples [Mon, 14 Apr 2008 13:09:44 +0000 (13:09 +0000)]
Change a few build/install knobs.
Roy Marples [Mon, 14 Apr 2008 12:43:52 +0000 (12:43 +0000)]
Implement arrays and fix getting strings.
Roy Marples [Mon, 14 Apr 2008 12:21:28 +0000 (12:21 +0000)]
Implement integer arrays.
Roy Marples [Mon, 14 Apr 2008 10:02:44 +0000 (10:02 +0000)]
Add loads more DHCP options from RFC2132 to the info file, also closes #53.
Roy Marples [Mon, 14 Apr 2008 06:57:18 +0000 (06:57 +0000)]
Add more dhcp types, #53
Roy Marples [Mon, 14 Apr 2008 06:35:05 +0000 (06:35 +0000)]
The H argument no means , which changes it's meaning from prior versions.
Roy Marples [Mon, 14 Apr 2008 03:45:54 +0000 (03:45 +0000)]
Add -o opt1,opt2 and -O to disable requesting optional options. Rejig our defaults around this.
Roy Marples [Sun, 13 Apr 2008 15:33:00 +0000 (15:33 +0000)]
We should check the cookie on messages.
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.