Matthias Schiffer [Fri, 10 Jan 2014 16:38:39 +0000 (17:38 +0100)]
Use getifaddrs to get the interface-id when not specified
Reimplementing this section also fixes two potential bugs:
1. Only link-local addresses should be used for automatic interface-id
selection, as it should always be assigned by the kernel and is always based
on the EUI-64 unless an administrator is doing strange things (while other
addresses might be chosen according to the privacy extensions or by an
administrator)
2. When no address is available (because of a race condition or because an
administrator removed it), RA packets should just be ignored; otherwise
an address with a zero interface-id might be assigned
Matthias Schiffer [Fri, 10 Jan 2014 12:10:37 +0000 (13:10 +0100)]
Whitespace fixes
Mostly trailing spaces or whitespace in empty lines.
Steven Barth [Sun, 5 Jan 2014 17:38:15 +0000 (18:38 +0100)]
Switch to a leaner MD5 library
Steven Barth [Mon, 30 Dec 2013 18:10:18 +0000 (19:10 +0100)]
Revert to old behaviour regarding information requests
Steven Barth [Mon, 30 Dec 2013 17:45:45 +0000 (18:45 +0100)]
Revert "Server unicast option support"
This reverts commit
348cbc2efee1281c3b39e705114f44eca72a8247.
Avoid too much bloat for rarely useful functionality
Steven Barth [Mon, 30 Dec 2013 17:33:25 +0000 (18:33 +0100)]
Fix compilation and cleanup
sbyx [Mon, 30 Dec 2013 17:15:54 +0000 (09:15 -0800)]
Merge pull request #9 from dedeckeh/master
Hans Dedecker [Mon, 30 Dec 2013 13:58:10 +0000 (14:58 +0100)]
Support for SOL_MAX_RT and INF_MAX_RT options (RFC7083)
Hans Dedecker [Fri, 27 Dec 2013 14:55:24 +0000 (15:55 +0100)]
Drop DHCPv6 messages containing invalid option length
Hans Dedecker [Fri, 27 Dec 2013 14:49:44 +0000 (15:49 +0100)]
Revert "Fix handling of DHCPv6 messages containing option lengths exceeding the message"
This reverts commit
26c5d8724355b29694af684ee29b47e52129a33c.
Hans Dedecker [Tue, 24 Dec 2013 16:22:05 +0000 (17:22 +0100)]
Add ICMPv6 validity check
Hans Dedecker [Tue, 24 Dec 2013 15:37:04 +0000 (16:37 +0100)]
Revert "Fix parsing of Router Advertisement messsages"
This reverts commit
de89d2888d38d1ca6676070584ea6ff9c7dd6f23.
Hans Dedecker [Thu, 19 Dec 2013 15:40:39 +0000 (16:40 +0100)]
Parse Router Advertisement Hop Limit parameter
Hans Dedecker [Thu, 12 Dec 2013 16:07:34 +0000 (17:07 +0100)]
Fix parsing of Router Advertisement messsages
Router Advertisement message checks according to RFC4861 paragraph 6.1.2
Fix and further improve router advertisement option parsing
Hans Dedecker [Thu, 12 Dec 2013 16:05:25 +0000 (17:05 +0100)]
Fix handling of DHCPv6 messages containing option lengths exceeding the message
Hans Dedecker [Thu, 12 Dec 2013 16:02:58 +0000 (17:02 +0100)]
Fix server candidate selection logic
Flush all server candidates for unbound client in stateless mode
Fix initial server candidate promotion condition
Hans Dedecker [Sun, 1 Dec 2013 17:57:06 +0000 (18:57 +0100)]
Fine tune server candidate selection logic
DHCPv6 server info from ADVERTISE messages is inserted in the server
candidate list sorted according to the preference value (highest values
first in the list).
Server candidate list can only contain one entry from a given server.
Server with highest preference value is selected; in case the server
does not respond the next server is selected from the list.
When the server candidate list is empty and no servers responded;
the client restarts the DHCPv6 server discovery process
Hans Dedecker [Sun, 1 Dec 2013 17:55:11 +0000 (18:55 +0100)]
Basic error checking when initializing ra
Hans Dedecker [Sun, 1 Dec 2013 17:49:36 +0000 (18:49 +0100)]
Fix receive rounds end condition
Hans Dedecker [Sun, 1 Dec 2013 17:47:19 +0000 (18:47 +0100)]
Remove setsockopt error checking
Hans Dedecker [Wed, 13 Nov 2013 15:04:42 +0000 (16:04 +0100)]
Server unicast option support
Hans Dedecker [Wed, 13 Nov 2013 15:03:34 +0000 (16:03 +0100)]
Improved message validation checks and socket error hardening
Steven Barth [Mon, 11 Nov 2013 14:34:05 +0000 (15:34 +0100)]
Finalizing bfd work
Steven Barth [Wed, 6 Nov 2013 12:04:53 +0000 (13:04 +0100)]
Fix bfd ping
Steven Barth [Tue, 5 Nov 2013 07:56:29 +0000 (08:56 +0100)]
Add experimental and unfinished bfd ping work
Steven Barth [Wed, 30 Oct 2013 13:13:50 +0000 (14:13 +0100)]
React to carrier down events as well
Steven Barth [Wed, 30 Oct 2013 12:43:15 +0000 (13:43 +0100)]
Fix compilation on 32-bit platforms
Steven Barth [Wed, 30 Oct 2013 12:37:05 +0000 (13:37 +0100)]
Detect "carrier up"-events and restart transaction
Steven Barth [Tue, 29 Oct 2013 14:19:42 +0000 (15:19 +0100)]
Make -F and -P arguments position independent
Steven Barth [Tue, 29 Oct 2013 14:00:08 +0000 (15:00 +0100)]
Be less verbose when sending solicits
Steven Barth [Tue, 29 Oct 2013 13:52:16 +0000 (14:52 +0100)]
Fix RA spam filter logic
Steven Barth [Wed, 23 Oct 2013 17:28:52 +0000 (19:28 +0200)]
Fix compilation on 64-bit platforms
Hans Dedecker [Wed, 23 Oct 2013 12:04:38 +0000 (12:04 +0000)]
odhpc6c: status code support in reply
The patch implements support for status code handling in
reply messages as described in RFC3313 paragraph 18.1.8.
The client will
*log the status codes returned by the client
*send a request if no binding status code is returned for
a given IA
*send further renew/rebind if the IA was not present in
the reply
*terminate message exchange when no prefix/no address
status code is returned in reponse to a request
*terminate message exchange when unspec fail status code
is returned
*calculate t1/t2/t3 when all IA's have been processed and
based on recorded t1/t2/valid timer values per IA
Without this patch I have seen issues with request messages
send without any IA_PD/IA_NA and t1/t2/t3 timer values which
were not correct. These changes have been tested intensive
against an ISC DHCPv6 server
Signed-off-by: Hans Dedecker <hans.dedecker@gmail.com>
Hans Dedecker [Wed, 23 Oct 2013 12:04:27 +0000 (12:04 +0000)]
odhcp6c: preference and status code support in advertise
The patch implements handling of advertise messages
as described in RFC3315 paragraph 17.1.2. Client will
stop collecting advertise messages if preference option
is equal to 255 or if the first RT has elapsed. Status
codes are handled in the advertise message depending on
the startup parameters
Signed-off-by: Hans Dedecker <hans.dedecker@gmail.com>
Hans Dedecker [Wed, 23 Oct 2013 12:04:01 +0000 (12:04 +0000)]
odhcp6c: message retransmission count support
The patch implements message retransmission count (MRC) support as
described in RFC3315 paragraphs 5.5 and 14 for DHCPv6 request/release/
decline messages. Patch also disables multicast packets loopback.
Signed-off-by: Hans Dedecker <hans.dedecker@gmail.com>
Steven Barth [Wed, 23 Oct 2013 08:13:00 +0000 (10:13 +0200)]
Avoid updating too often if ISP spams RAs
Steven Barth [Thu, 17 Oct 2013 07:19:01 +0000 (09:19 +0200)]
Fix handling of PD-Advertisements
Steven Barth [Mon, 14 Oct 2013 13:29:39 +0000 (15:29 +0200)]
Make SOL_MAX_RT configurable and default to 120
Steven Barth [Mon, 14 Oct 2013 12:14:15 +0000 (14:14 +0200)]
Prefer servers with bigger prefixes
Steven Barth [Fri, 11 Oct 2013 07:33:00 +0000 (09:33 +0200)]
Don't hang indefinitely if REQUEST is never answered
Steven Barth [Mon, 7 Oct 2013 08:21:34 +0000 (10:21 +0200)]
odhcp6c: improve server selection
Steven Barth [Fri, 4 Oct 2013 06:26:38 +0000 (08:26 +0200)]
Check for local addr more often
Steven Barth [Wed, 2 Oct 2013 14:10:43 +0000 (16:10 +0200)]
ra: validate hop-limit
Steven Barth [Sat, 21 Sep 2013 10:49:05 +0000 (12:49 +0200)]
Handle NoAddrsAvail IA-status
Steven Barth [Wed, 18 Sep 2013 10:25:20 +0000 (12:25 +0200)]
Restart transaction if server returns IAID error code
Steven Barth [Thu, 12 Sep 2013 12:48:57 +0000 (14:48 +0200)]
Add default T1, T2, T3 for buggy servers
Steven Barth [Sat, 31 Aug 2013 08:48:56 +0000 (10:48 +0200)]
Merge preliminary prefix class support
Steven Barth [Sat, 31 Aug 2013 08:11:15 +0000 (10:11 +0200)]
Merge branch 'hnet'
Conflicts:
src/ra.c
Steven Barth [Fri, 30 Aug 2013 14:57:23 +0000 (16:57 +0200)]
Update README
Steven Barth [Fri, 30 Aug 2013 15:41:55 +0000 (17:41 +0200)]
Remove DAD for now due to kernel issues
Markus Stenberg [Thu, 1 Aug 2013 09:05:56 +0000 (11:05 +0200)]
Merge remote-tracking branch 'up/master' into hnet
Steven Barth [Thu, 1 Aug 2013 07:28:27 +0000 (09:28 +0200)]
Fix including PD in request
Markus Stenberg [Wed, 31 Jul 2013 21:58:33 +0000 (23:58 +0200)]
Merge remote-tracking branch 'up/master' into hnet
Steven Barth [Wed, 31 Jul 2013 17:05:55 +0000 (19:05 +0200)]
Include IAs in Request to be more compatible with some servers
Maico Le Pape [Tue, 30 Jul 2013 21:10:54 +0000 (23:10 +0200)]
Add support for colored address in IA_NA
Signed-off-by: Maico Le Pape <mlepape@cisco.com>
Steven Barth [Wed, 3 Jul 2013 17:15:36 +0000 (19:15 +0200)]
Add better overflow safety in resend
Markus Stenberg [Mon, 24 Jun 2013 10:53:03 +0000 (13:53 +0300)]
Merge branch 'master' into hnet
Conflicts:
README
src/dhcpv6.c
src/odhcp6c.h
Steven Barth [Tue, 18 Jun 2013 12:44:43 +0000 (14:44 +0200)]
Allow overriding the interface-identifier for public addresses
Steven Barth [Thu, 13 Jun 2013 06:36:31 +0000 (08:36 +0200)]
Add sanity checks for NDP and MTU parameters from RAs
Steven Barth [Fri, 31 May 2013 14:05:00 +0000 (16:05 +0200)]
Update README
Steven Barth [Fri, 31 May 2013 13:45:42 +0000 (15:45 +0200)]
Work around false-positive DAD-hits
Steven Barth [Fri, 31 May 2013 09:27:48 +0000 (11:27 +0200)]
Fix handling of multiple RAs in a row.
The default route-entry was not correctly reinitialized.
Thanks to pmarks-net for the detailed bugreport.
Steven Barth [Tue, 28 May 2013 16:26:34 +0000 (18:26 +0200)]
Add more sanity checks and logging to DAD
Steven Barth [Tue, 21 May 2013 10:10:37 +0000 (12:10 +0200)]
Honor T1 and T2 from server better
Steven Barth [Tue, 21 May 2013 08:25:33 +0000 (10:25 +0200)]
Fix reconfigure accept option transmission
Steven Barth [Mon, 20 May 2013 14:27:23 +0000 (16:27 +0200)]
Fix IA expiring logic
Steven Barth [Wed, 15 May 2013 11:06:29 +0000 (13:06 +0200)]
script: fix delay call handling
Steven Barth [Mon, 13 May 2013 15:17:07 +0000 (17:17 +0200)]
Export AFTR-IP as well and update README
Steven Barth [Mon, 13 May 2013 15:00:38 +0000 (17:00 +0200)]
Fix possible buffer overflows in DNS handling
Steven Barth [Sun, 12 May 2013 09:03:48 +0000 (11:03 +0200)]
Add support for DS-Lite AFTR
Steven Barth [Wed, 8 May 2013 12:39:35 +0000 (14:39 +0200)]
Use key=val pairs for additional prefix params
Steven Barth [Mon, 6 May 2013 19:00:31 +0000 (21:00 +0200)]
Update README
Steven Barth [Sun, 5 May 2013 14:11:25 +0000 (16:11 +0200)]
Readjust call-delay to be more backward-compatible
Steven Barth [Sun, 5 May 2013 13:56:42 +0000 (15:56 +0200)]
Set a global default DHCPv6 exchange timeout
This delays SLAAC-updates before any DHCPv6-binding is established.
Steven Barth [Tue, 23 Apr 2013 06:30:46 +0000 (08:30 +0200)]
Update README again
Steven Barth [Tue, 23 Apr 2013 06:26:01 +0000 (08:26 +0200)]
Update README
Steven Barth [Tue, 23 Apr 2013 06:20:26 +0000 (08:20 +0200)]
Set default SOL_MAX_RT to 1h
Steven Barth [Mon, 22 Apr 2013 17:46:14 +0000 (19:46 +0200)]
Several bugfixes
Steven Barth [Sun, 21 Apr 2013 17:58:24 +0000 (19:58 +0200)]
Set SOL_MAX_RT to 7200 according to RFC 6204 bis
Steven Barth [Sun, 14 Apr 2013 17:29:20 +0000 (19:29 +0200)]
Fix authentication option format
Steven Barth [Mon, 8 Apr 2013 07:18:26 +0000 (09:18 +0200)]
Fix CFLAGS and README
Steven Barth [Mon, 8 Apr 2013 07:12:50 +0000 (09:12 +0200)]
Fix compilation
Steven Barth [Mon, 8 Apr 2013 06:58:58 +0000 (08:58 +0200)]
Add reconfigure authentication
Steven Barth [Sun, 7 Apr 2013 09:25:11 +0000 (11:25 +0200)]
Initial support for RFC 6603
Steven Barth [Thu, 4 Apr 2013 09:19:12 +0000 (11:19 +0200)]
Update license headers
Steven Barth [Thu, 4 Apr 2013 09:05:51 +0000 (11:05 +0200)]
Update README to reflect RA-features
Markus Stenberg [Tue, 26 Mar 2013 14:45:05 +0000 (16:45 +0200)]
Fixed prefix class finding - it was starting from wrong offset. Now works.
sbyx [Tue, 26 Mar 2013 13:26:25 +0000 (06:26 -0700)]
Merge pull request #6 from fingon/bugfix
Fixed a race condition with signals
Markus Stenberg [Tue, 26 Mar 2013 13:22:05 +0000 (15:22 +0200)]
Merge branch 'master' into hnet
Markus Stenberg [Tue, 26 Mar 2013 13:16:24 +0000 (15:16 +0200)]
Merge branch 'bugfix' into hnet
Markus Stenberg [Tue, 26 Mar 2013 13:15:25 +0000 (15:15 +0200)]
Fixed race condition - ra_init may already result in SIGIO, and without signal handler set, code goes boom.
Markus Stenberg [Tue, 26 Mar 2013 13:12:50 +0000 (15:12 +0200)]
First hnet-based version.
Steven Barth [Mon, 25 Mar 2013 11:45:38 +0000 (12:45 +0100)]
Fix IA-status detection
Steven Barth [Wed, 20 Mar 2013 13:43:09 +0000 (14:43 +0100)]
Don't output on stderr by default
Steven Barth [Wed, 20 Mar 2013 10:24:30 +0000 (11:24 +0100)]
Fix priority for on-link routes for prefixes
Steven Barth [Mon, 18 Mar 2013 08:21:53 +0000 (09:21 +0100)]
Fix several incorrect array indices
* fixes preference handling
* fixes custom client IDs
Steven Barth [Fri, 8 Mar 2013 07:58:28 +0000 (08:58 +0100)]
Add option to not send RELEASE when stopping
Steven Barth [Fri, 8 Mar 2013 07:53:13 +0000 (08:53 +0100)]
Fix timing issues with large T1 and T2 values
Steven Barth [Mon, 11 Feb 2013 13:08:05 +0000 (14:08 +0100)]
Be less verbose in log
Steven Barth [Mon, 11 Feb 2013 13:02:16 +0000 (14:02 +0100)]
Do not send undesired preferences for valid and / or preferred times