Roy Marples [Fri, 29 Nov 2013 11:15:03 +0000 (11:15 +0000)]
Read the embedded config into global values rather than each time
per interface.
Add config toggles to build dhcpcd-embedded.conf into dhcpcd or
to read it at runtime. The build process will now build .c and .h
files based on dhcpcd-embedded.conf and provide defines to reduce
the number or re-allocs if it grows (ie has the full DHCP option list).
Roy Marples [Wed, 27 Nov 2013 20:21:17 +0000 (20:21 +0000)]
Add support for user defined options with embedded and encapsulated options.
Install dhcpcd-embedded.conf to LIBEXECDIR which is read before dhcpcd.conf.
The idea is that this dhcpcd-embedded.conf is maintained only by me to support
RFC DHCP/DHCPv6 options that require known embedded or ncapsulated options
which are not easily added to our option structures in dhcp.c and dhcp6.c.
Eventually we may move the whole structure here so that a smaller binary
is produced and the definitions are easier to maintain.
Roy Marples [Fri, 15 Nov 2013 16:44:46 +0000 (16:44 +0000)]
Change IAID to default from the last 4 bytes of the MAC address.
Rationale in the commit, but in a nutshell it allows for a stable
IAID between reboots without persistent storage and across
different OS's who name or number it differently to each other.
Roy Marples [Fri, 15 Nov 2013 13:43:41 +0000 (13:43 +0000)]
Allow IAID to be configured in DHCPv4 clientid.
Use this as the default for DHCPv6 IA's as well.
Rename if_iaid to if_ia as it's really an IA containing an IAID.
Roy Marples [Sun, 10 Nov 2013 11:17:40 +0000 (11:17 +0000)]
Set blank CFLAGS/CPPFLAGS and then append user CFLAGS/CPPFLAGS.
This allows us to pass them to the configure tests and keep our
sed to extract them portable.
Roy Marples [Thu, 12 Sep 2013 21:13:41 +0000 (21:13 +0000)]
Dev module start now returns an fd to monitor so the eloop additions
can go into dev.c
Create a new struct to pass dhcpcd handle_interface to dev plugins
This allows us to build the dhcpcd binary normally and save a few k
disk space.
Roy Marples [Thu, 12 Sep 2013 15:43:20 +0000 (15:43 +0000)]
Instead of linking directly to libudev, create a plugin system for /dev
management. This allows dhcpcd to work even if udev removed and adds the
ability to change from udev to something else in the future.
Roy Marples [Tue, 10 Sep 2013 09:56:11 +0000 (09:56 +0000)]
Instead of just renaming the interface on Linux, take the FreeBSD
approach and remove the old and create a new one.
This simple change allows the the allow/deny rules to be followed.
Roy Marples [Fri, 6 Sep 2013 09:38:24 +0000 (09:38 +0000)]
It seems that FreeBSD will send RTM_DELADDR + RTM_NEWADDR when
replacing an existing IPv4 address with the same values.
As such, we need to maintain a list of configured IPv4 addresses
for each interface so we know when to add it and when to skip it
to avoid receiving bogus RTM_DELADDR messages from ourself.
Roy Marples [Fri, 2 Aug 2013 09:10:38 +0000 (09:10 +0000)]
Slackware uses /etc/rc.d/rc.$service instead of just $service,
so configure doesn't find those. This patch overrides the
defaults for SERVICEEXISTS, SERVICECMD, and SERVICESTATUS.
Thanks to Robby Workman.
Roy Marples [Thu, 25 Jul 2013 15:10:16 +0000 (15:10 +0000)]
Add the option hostname_short, which will force the sending of the
short hostname so DDNS will always work, even if the hostname domain
is different from the DHCP servers.
Change hostname_fqdn to true/false/unset value.
unset means use what the DHCP server supplies
(DHCPv4/DHCPv6 maybe inconsistent depending on server setup)
true/false force the hostname to be either a FQDN or a short name.