Commit Graph

38 Commits

Author SHA1 Message Date
Roy Marples
717bc86c88 Fix some -Wconversion errors on FreeBSD. 2014-04-25 13:05:15 +00:00
Roy Marples
34457fe661 Add -Wconversion to debug CFLAGS and fix fallout. 2014-03-27 22:14:52 +00:00
Roy Marples
94a79cea05 If not specified, Delegated Prefixes will get an automatic SLA of the
interface index. If the biggest SLA and the assigned prefix fits into a /64
then dhcpcd creates a /64 prefix so that SLAAC works. If bigger than /64
is needed then dhcpcd creates one rounded upto the nearest multiple of 8.

Unless a configured SLA of 0 is assigned, a reject route for the Delegated
Prefix is installed to stop unassigned addresses trying to be resolved upstream.

Addresses added from Delegated Prefixes now have a default address suffix of 1
instead of using a SLAAC style address.
2014-03-22 19:55:29 +00:00
Roy Marples
298c01136e Fix compile without INET or INET6. 2014-02-13 08:15:05 +00:00
Roy Marples
1681b12609 PATH_MAX is too much, lets be more precise 2014-02-12 11:16:22 +00:00
Roy Marples
4eb7b4896f Move all global variables into contexts, with a small exception for
signal handling.
This allows dhcpcd to work better in a threaded environment such as rtems.
2014-02-12 00:39:46 +00:00
Roy Marples
fdff5377bf RFC7083 has new inital timer values. 2014-02-03 11:02:17 +00:00
Roy Marples
776e5fbb8d Add support for the following RFCs:
DHCP SLP Directory Agent, RFC2610
	DHCP Name Service Search, RFC2937
	DHCP PANA Authentication Agent, RFC5192
	DHCP Lost Server, RFC5223
	DHCP CAPWAP, RFC5417
	DHCP Mobility Services, RFC5678
	DHCP SIP UA, RFC6011
	DHCP ANDSF, RFC6153
	DHCP RDNSS Selection for MIF Nodes, RFC6731
	DHCP TFTP Server Address, RFC5859
	DHCP PXELINUX, RFC5071
	DHCP Access Network Domain Name, RFC5986
	DHCP Virtual Subnet Selection, RFC6607
	DHCP Relay Agent Remote-ID, RFC4649
	DHCP Relay Agent Subscriber-ID, RFC4580
	DHCPv6 Relay-ID, RFC5460
	DHCPv6 LIS Discovery, RFC5986
	DHCPv6 SIP UA, RFC6011
	DHCPv6 Network Boot, RFC5970
	DHCPv6 Home Info Discovery in MIPv6, RFC6610
	DHCPv6 RDNSS Selection for MIF Nodes, RFC6731
	DHCPv6 Kerberos, RFC6784
	DHCPv6 Relay-Triggered Reconfiguraion, RFC6977
	DHCPv6 SOL_MAX_RT, RFC7083
2014-02-03 10:28:30 +00:00
Roy Marples
914386bdad Support RECONFIGURE DHCPv6 messages. 2014-01-31 14:25:18 +00:00
Roy Marples
699660fba0 If no status message given, supply a default. 2014-01-29 18:33:43 +00:00
Roy Marples
c73ed17160 Implement RFC 1321 MD5 Message-Digest if not provided in libc.
Implement RFC 2104 HMAC Keyed Hashing.

Implement RFC 3118 Authentication for DHCP Messages
and RFC 3315 Authentication options.
2014-01-25 01:35:53 +00:00
Roy Marples
7a911e57cb Add support for RFC3925 Vendor-Identifying Vendor Options 2013-12-06 17:47:53 +00:00
Roy Marples
ae4e592fa2 Remove hard coded DHCP/DHCPv6 options and then to dhcpcd-definitions.conf
This file replaces dhcpcd-embedded.conf
This actually results in a slightly smaller binary than before and has the
added advantage that the option definitions are now all held within one file.
2013-12-02 16:42:09 +00:00
Roy Marples
1cd05a96d5 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).
2013-11-29 11:15:03 +00:00
Roy Marples
3985931e45 Implement RFC4242, Information Refresh Time Option for DHCPv6. 2013-11-12 17:30:43 +00:00
Roy Marples
a4f05801cd Fix build without INET6 2013-09-05 08:39:38 +00:00
Roy Marples
a8c05b2710 Fix a compile issue on Big Endian machines.
Don't use magic numbers for DHCPv6 FQDN bits.
2013-06-22 09:15:35 +00:00
Roy Marples
a0de5b67f6 Add initial delays as per RFC3315, 17.1.2, 18.1.2 and 18.1.5.
When rebooting an interface, re-request information or abort
the current transaction and re-discover.
2013-06-12 15:01:59 +00:00
Roy Marples
1f4c1525a5 Purge prefix list and routers at start of IPv6 for BSD.
Remove link_addr compact function as we now had a LL address list.
Fix INET and INET6 seperate compiles.
2013-06-10 00:56:54 +00:00
Roy Marples
336dd1b83b Move signal handling into dhcpcd.c
Log the PID of the signal caller
Move syslog functions out of the signal handler if we're not
exiting as it's not safe.
Close existing IPv4 sockets when restarting an interface.
Fix control handling keeping current flags and accepting new ones.
2013-06-07 12:44:19 +00:00
Roy Marples
6bb6f71742 Add support for Rapid Commit, RFC3315 and RFC4039. 2013-06-05 23:57:03 +00:00
Roy Marples
cc3c3560f6 Add DHPCv6 FQDN support (RFC4704)
Improve hostname support in general, so we are aware of hostname changes.
When setting the hostname, prefer the FQDN name or append a domain.
2013-06-05 16:23:24 +00:00
Roy Marples
be2a8dac4e Support the DHCPv6 unicast option. 2013-06-05 10:37:45 +00:00
Roy Marples
22ea2b0deb Automate the assignment of SLA ids if not given for Prefix Delegation.
This means you can just request an ia_pd and let dhcpcd do the rest :)
2013-06-02 09:51:30 +00:00
Roy Marples
d128d95214 Build BOUND routes before DELEGATED ones.
Use const a little more.
2013-05-31 15:01:27 +00:00
Roy Marples
a2258eb383 Remove some const const warnings found by clang. 2013-05-22 22:58:15 +00:00
Roy Marples
d8194bcd39 Check address flags for tentative and duplicates bits for sanity.
Handle the actual trigger to callout dhcpcd-run-hooks in the DAD callback
instead of on receipt of RTM_NEWADDR directly. This is more code, but it allows
us to use our own DAD engine if we need to.
2013-05-16 10:31:21 +00:00
Roy Marples
a8df1b28fb Use the kernel DAD for IPv6 addresses and finish the action once each
address DAD completes. BSD kernels will require a patch as noted within
the README. The linux netlink part still needs to be written.
2013-05-15 10:27:36 +00:00
Roy Marples
5dff2872ab Add RFC4833 support for TimeZone options. 2013-05-03 13:38:54 +00:00
Roy Marples
3491ea4d56 Change from _unused to __unused to match NetBSD cdefs and avoid
a compiler failure on linux-headers-3.7
2013-04-24 09:38:18 +00:00
Roy Marples
a42c42f899 Add RELEASE support to DHCPv6 2013-04-04 21:59:02 +00:00
Roy Marples
00ababe4a0 Add DHCPv6 Prefix Delegation support, RFC3633.
Add DHCPv6 Temporary Address support, RFC3315.
2013-04-01 12:15:47 +00:00
Roy Marples
aae24feb3d It's now possible to compile out IPv4 and IPv6 support by passing
--disable-ipv4 or --disable-ipv6 to configure.
2013-02-04 13:30:35 +00:00
Roy Marples
a1b4cfcada Send to all dhcp agents instead of all routers. 2012-11-13 15:16:27 +00:00
Roy Marples
94582a4d23 Expire the DHCPv6 lease when carrier drops. 2012-11-11 19:56:01 +00:00
Roy Marples
e54dee19ba Implement the core DHCPv6 client for SOLICIT, REQUEST, RENEW, CONFIRM. 2012-11-06 23:40:15 +00:00
Roy Marples
652b80c8a9 Drop DHCPv6 on carrier down.
Send DHCPv6 interface information.
2012-10-12 19:10:04 +00:00
Roy Marples
d7555c1259 Add DHCPv6 INFORM support.
This is automatically started when RA flags O is set.
If no DHCPv6 request options are configured in dhcpcd.conf then we
request domain servers and search lists.
2012-10-12 10:31:51 +00:00