Roy Marples
94bec97280
Namespace all public dhcpcd.c functions.
...
Add ipv4, ipv6, dhcp and dhcp6 options to re-enable if disabled globally.
Try and load a delegated interface if not running on all interfaces.
Fix delegated interfaces without a prefix set.
2014-04-28 12:02:12 +00:00
Roy Marples
e9f942eab9
printf time_t, hmmmm
2014-04-25 13:14:21 +00:00
Roy Marples
717bc86c88
Fix some -Wconversion errors on FreeBSD.
2014-04-25 13:05:15 +00:00
Roy Marples
1a7ff10050
Move net.c to if.c.
...
Ensure that if.c and if-KERNEL.c are namespaced correctly.
2014-04-25 10:42:37 +00:00
Roy Marples
62247de8be
Support older systems with different defines for IPV6_RECVHOPLIMIT and IPV6_RECVPKTINFO.
2014-04-24 09:41:25 +00:00
Roy Marples
f751cdf6d3
64-bit clang fallout
2014-03-27 23:15:14 +00:00
Roy Marples
76bb4d039d
Fix some 64-bit fallout
2014-03-27 23:00:32 +00:00
Roy Marples
34457fe661
Add -Wconversion to debug CFLAGS and fix fallout.
2014-03-27 22:14:52 +00:00
Roy Marples
026bfbf024
Don't need to zero as many bytes.
...
Thanks to Alan Barrett.
2014-03-27 19:12:03 +00:00
Roy Marples
69e9a35f46
Be specific
2014-03-22 20:42:40 +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
cda2f2a9c8
Add a reject route for the delegated prefix so that unassigned prefixes don't go back upstream.
2014-03-20 16:36:03 +00:00
Roy Marples
cc43133914
Set hoplimit by IPV6_MULTICAST_HOPS intead of each time we send.
2014-03-12 15:59:19 +00:00
Roy Marples
b826c088b7
Remove notion of hoplimit from DHCPv6
2014-03-12 15:39:53 +00:00
Roy Marples
c12837916b
Clarify hop limit
2014-03-12 00:50:02 +00:00
Roy Marples
5524ade10d
Set a hop limit on our DHCPv6 messages.
2014-03-11 23:41:16 +00:00
Roy Marples
32a8030a00
Whitespace
2014-03-11 23:00:14 +00:00
Roy Marples
9cf6e1039b
More fixes to dhcp dumping leases.
...
When running dump and test hooks, exit early to allow as non root.
2014-03-11 22:37:10 +00:00
Roy Marples
1ef693d0ca
Describe DHCPv6 better.
2014-03-11 09:39:52 +00:00
Roy Marples
f15c575a0f
Fix reconfigure behaviour
2014-03-10 17:37:24 +00:00
Roy Marples
56d6cf9ccc
Fix a crash when accepting a reconfigure key.
...
Check if a reconfigure message before checking state so reconfigure works.
2014-03-10 15:28:49 +00:00
Roy Marples
9a243eb205
Fix assignment error from strcpy removal.
2014-03-06 19:30:30 +00:00
Roy Marples
7529fdf1af
Tentative does not mean RTM_DELADDR.
...
This fixes RTM address handling on FreeBSD and OpenBSD.
Instead of listening for duplicate address messages for
FreeBSD and OpenBSD simply poll for the address flag changing.
This means less code to maintain and hopefully less error-prone.
Remove dead code which send a DAD as this is, and should,
be done entirely in the kernel.
2014-03-06 19:11:55 +00:00
Roy Marples
3af8f2b277
Change the last strcpy calls to strlcpy.
2014-03-06 09:12:06 +00:00
Roy Marples
7bb6c2e0e7
options is long long.....
2014-03-03 19:57:24 +00:00
Roy Marples
98d7a13dfa
When deleting IPv6 addresses, remove them from our internal address state
...
as well so we perform DAD when rebinding.
Remove debug added with prior commit.
2014-03-03 13:56:49 +00:00
Roy Marples
4145d2b68a
Expire DHCP lease and then run no carrier as a seperate operation.
...
Instead of waiting the maximum amount of time to report DAD failure/completion, poll the address flags periodically.
2014-03-03 12:10:58 +00:00
Roy Marples
831c7446c0
Fix some silly warnings.
2014-02-28 10:38:29 +00:00
Roy Marples
e0f4eba913
Fix more clang analyzer warnings. i386/NetBSD and amd64/Linux are now clear.
2014-02-28 10:34:05 +00:00
Roy Marples
d7cfde68f0
Fix more clang analyzer errors
2014-02-27 21:11:43 +00:00
Roy Marples
8fc52ced6f
Fix all errors reported by clang static analyser.
2014-02-27 20:00:39 +00:00
Roy Marples
e8c8e9b9b2
Work without SOCK_CLOEXEC again.
2014-02-13 12:58:58 +00:00
Roy Marples
2433e54dc8
Ensure we close the contol socket if we fail to connect.
...
Don't crash when closing IPv6ND or DHCPv6 when not the IPv6 protocol is
not started.
2014-02-12 20:51:57 +00:00
Roy Marples
e9882fb08a
Ensure we remove the socket from the eloop event queue before closing it.
2014-02-12 10:29:06 +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
d074b2494f
Move vendor out of global scope.
2014-02-08 00:29:02 +00:00
Roy Marples
cc0502023e
Remove custom set_cloexec and set_nonblock functions.
...
Instead pass O_CLOEXEC or SOCK_CLOEXEC to open, socket, etc.
This requires a fairly modern system.
2014-02-07 17:32:08 +00:00
Roy Marples
a9d78def54
Remove DEBUG_MEMORY guard and always free memory and resources.
...
Remove all atexit(3) and exit(3) calls, instead exiting via the eloop.
2014-02-04 14:39:26 +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
f9e1527739
Reset reconfigure token when dropping a lease.
...
Only send a reconfigure accept option if we aren't sending any
authentication OR don't require authentication.
2014-01-31 18:33:11 +00:00
Roy Marples
fff89bfe34
Remove debug
2014-01-31 14:26:58 +00:00
Roy Marples
914386bdad
Support RECONFIGURE DHCPv6 messages.
2014-01-31 14:25:18 +00:00
Roy Marples
439b5cabf1
Improve authentication logging.
2014-01-30 14:20:24 +00:00
Roy Marples
699660fba0
If no status message given, supply a default.
2014-01-29 18:33:43 +00:00
Roy Marples
33ff20276e
If we aren't sending an authentication option, don't update it.
2014-01-29 17:21:14 +00:00
Roy Marples
d4154ba7a8
Add nodhcp and nodhcp6 directives.
...
Thanks to Sebastian Huber for the initial patch and testing.
2014-01-29 14:05:58 +00:00
Roy Marples
5fdd9fc3cb
Warn about missing auth
2014-01-25 02:41:42 +00:00
Roy Marples
37c6edb125
Reply authentication every time we send a message as have updated
...
the elapsed time.
2014-01-25 02:23:41 +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
e2e644e9b7
Mark more data as read only.
...
Thanks to Sebastian Huber.
2014-01-14 14:40:36 +00:00