Roy Marples
6d3ed56804
Fix configure error
2014-05-30 22:02:16 +00:00
Roy Marples
55e83eba2d
Load config.{h,mk} when building tests. Fixes [1c11c59282].
2014-05-30 21:47:14 +00:00
Roy Marples
c85baeae3e
-4 and -6 are now mutually exclusive and when running on a single interface
...
per protocol pidfiles are created.
This means that other control options suchs as -x and -n will require the
-4 or -6 option as well.
2014-05-29 12:52:27 +00:00
Roy Marples
5b76368086
Check naming rules before calling dev_initialized.
2014-05-29 11:12:09 +00:00
Roy Marples
362153f5b4
Only process IPv6 neighbour messages from the link socket if we have inited
...
our internal IPv6 state.
2014-05-29 06:43:54 +00:00
Roy Marples
890f82d9bd
Fix dev warning.
2014-05-24 20:11:42 +00:00
Roy Marples
6eda989ce8
Should use arc4random_uniform when wanting a randon number between
...
1 and N.
Improve the compat arc4random function a little and re-stir on fork.
2014-05-24 19:58:50 +00:00
Roy Marples
eb33667132
Add a compat syslog function if the libc syslog does not support LOG_PERROR.
...
Add a non working if-sun.c stub.
Define IN6_IFF_TENTATIVE and friends to zero so IPv6 at least compiles on Solaris.
Warn that Solaris support presently does not work.
2014-05-24 13:08:29 +00:00
Roy Marples
26c177737e
Source now compiles on Solaris, just missing the if-sun.c support so
...
linking fails.
2014-05-21 23:07:52 +00:00
Roy Marples
d8cb89586b
Sockets would be opened with PF_*, not AF_*.
2014-05-20 08:54:00 +00:00
Roy Marples
f31c6094c5
Only remove the interface from DHCP consideration if the error
...
sending a packet is not a network error.
2014-05-20 08:36:12 +00:00
Roy Marples
047235d751
If a DHCPv6 lease expires as well as all IPv6 routers who want DHCPv6, don't restart discover.
2014-05-19 00:49:14 +00:00
Roy Marples
daef8a8242
Although dhcpcd now works fine with non blocking sockets, we never ever want to block either.
...
So restore the the NON blocking flags.
2014-05-19 00:32:04 +00:00
Roy Marples
0b32a745d3
Only remove the interface from the list once all callouts have been
...
completed.
2014-05-16 15:03:28 +00:00
Roy Marples
51ec4f3c44
Don't set probe state here.
2014-05-16 15:02:58 +00:00
Roy Marples
be6184ce72
Only send interfaces which have a reason.
2014-05-15 12:02:03 +00:00
Roy Marples
a93e79c68f
controlgroup option changes group ownership of the control socket.
2014-05-09 12:09:05 +00:00
Roy Marples
7be5ce4cd9
Ensure that ND6_IFF_PERFORMNUD is set.
2014-05-08 23:55:33 +00:00
Roy Marples
85cdddc2c9
Fix compile issue
2014-05-08 23:38:15 +00:00
Roy Marples
72c37f5f56
Support RTM_GETNEIGH on Linux as well as the polling for NUD changes on BSD.
...
Fixes [bb6153d18b].
2014-05-08 23:35:30 +00:00
Roy Marples
a3ee6b2392
Poll kernel neighbour reachability (SIOCGNBRINFO_IN6) for each router
...
instead of sending and listening for Neighbour Soliciation/Advertisement
packets. The kernel is privy to a lot more reachability information than
userland is.
Fixes [bb6153d18b].
2014-05-07 13:31:32 +00:00
Roy Marples
4afb9c4336
Run NOCARRIER before dropping protocols.
2014-05-07 09:22:26 +00:00
Roy Marples
23f78f35c2
These are not DHCP states.
2014-05-06 18:15:52 +00:00
Roy Marples
67616a589a
Add the interface to our list before initing state.
2014-05-06 18:14:43 +00:00
Roy Marples
b4304101ee
Always send a carrier as it's no longer encapsulated in the IPv4 stack.
...
When stopping and not departed, run with the STOPPED reason but do
not process it in hooks.
2014-05-06 14:42:24 +00:00
Roy Marples
8d442d9eac
When dropping, move the new config onto the old before running the script.
2014-05-06 14:39:31 +00:00
Roy Marples
26ede0ceb8
When rebooting, directly call send_request to preserve state.
2014-05-06 12:42:39 +00:00
Roy Marples
dfa8de358f
Fix sending DHCPv6
2014-05-05 21:21:31 +00:00
Roy Marples
994457f6dd
Fix new dhcp environment options
2014-05-05 20:18:14 +00:00
Roy Marples
e61b2a429f
Fix writing interfaces to control socket.
2014-05-04 22:48:43 +00:00
Roy Marples
d936ec19fc
Fix compile.
2014-05-03 21:18:20 +00:00
Roy Marples
d56187a6dc
RFC2131 section 4.4.1 states the client SHOULD wait a random time between
...
one and ten seconds to desynchronize the use of DHCP at startup.
Instead we wait a random time between zero and one second to mirror
the more modern IPv6RS and DHCPv6 standards unless overridden by
defining RFC2131_STRICT.
2014-05-03 19:56:15 +00:00
Roy Marples
6e6e06af14
Respect RFC4861 MAX_RTR_SOLICITATION_DELAY as specified in section 6.3.7.
2014-05-03 19:53:22 +00:00
Roy Marples
17d810346d
Check secondaries value before writing it as /proc could be read-only.
2014-05-03 10:17:48 +00:00
Roy Marples
e0328e42a7
Remove accidental commit.
2014-05-03 00:12:19 +00:00
Roy Marples
c33041b050
Minor optimisation
2014-05-03 00:11:15 +00:00
Roy Marples
40c4e6986c
Put POLLHUP back
2014-05-03 00:08:12 +00:00
Roy Marples
6c0a984560
Set EOF correctly
2014-05-03 00:02:14 +00:00
Roy Marples
68e672702b
Change the readrawsocket API a little so that we know when EOF is reached.
...
This allows us to remove the non blocking option from our sockets due to the way BPF works.
2014-05-02 23:54:29 +00:00
Roy Marples
94cb985a8e
Log any errors sending the interface afer a getinterfaces call.
2014-05-02 20:57:21 +00:00
Roy Marples
51a0c7b0eb
Accepted sockets should be marked non blocking.
2014-05-02 20:56:10 +00:00
Roy Marples
3c35f66fd1
When a node first becomes stale, fire off a NS probe anyway.
...
This is outside of the RFC, but it seems that some nodes do not
respond with a NA fast enough to avoid log spam.
2014-05-02 14:23:41 +00:00
Roy Marples
ae4f8bd77e
Once reachability + randomisation has passed, wait DELAY_FIRST_PROBE_TIME
...
seconds and then send MAX_UNICAST_SOLICIT probes at retranstimer intervals.
If no confirmation and another retranstimer interval has passed, expire the
address.
More RFC4861 conformant.
2014-05-02 12:31:21 +00:00
Roy Marples
8d5de85324
Optimise the initial probe timer.
...
Don't send more than MAX_UNICAST_SOLICIT reachability probes.
2014-05-02 11:03:46 +00:00
Roy Marples
53017d65d9
The unreachable timer should start AFTER the initial discovery packet is
...
sent, and that is first send after the retransmission timer has fired.
2014-05-02 10:16:00 +00:00
Roy Marples
d5571c7a56
Document why we don't send both FQDN and hostname options.
2014-05-02 06:40:21 +00:00
Roy Marples
c68ed24a38
Remove debug
2014-04-30 14:14:03 +00:00
Roy Marples
7cf6ba7ec3
Support ND6_IFF_OVERRIDE_RTADV
2014-04-30 14:13:22 +00:00
Roy Marples
8d1fab0c74
Fix some potential memory errors.
2014-04-30 10:02:20 +00:00
Roy Marples
a8c8e686c8
Fix some possible leaks.
2014-04-30 09:50:00 +00:00