project/odhcp6c.git
10 years agoRemove BFD from master-branch (kept in BFD-branch)
Steven Barth [Wed, 13 Aug 2014 11:30:42 +0000 (13:30 +0200)]
Remove BFD from master-branch (kept in BFD-branch)

10 years agoSend router solicitations with source link-layer address
Steven Barth [Mon, 21 Jul 2014 10:10:38 +0000 (12:10 +0200)]
Send router solicitations with source link-layer address

10 years agoFilter FQDN as well
Steven Barth [Fri, 30 May 2014 14:51:22 +0000 (16:51 +0200)]
Filter FQDN as well

10 years agoImprove filter
Steven Barth [Fri, 30 May 2014 14:49:05 +0000 (16:49 +0200)]
Improve filter

10 years agofilter DNS-domain from passthru
Steven Barth [Fri, 23 May 2014 06:29:34 +0000 (08:29 +0200)]
filter DNS-domain from passthru

10 years agoAdd support for DHCPv6 option passthru
Steven Barth [Fri, 23 May 2014 06:15:49 +0000 (08:15 +0200)]
Add support for DHCPv6 option passthru

10 years agoAdd MAPE / MAPT / LW4O6 to Readme
Steven Barth [Thu, 8 May 2014 09:12:43 +0000 (11:12 +0200)]
Add MAPE / MAPT / LW4O6 to Readme

10 years agosoftwire: fix DMR parsing
Steven Barth [Thu, 8 May 2014 09:06:32 +0000 (11:06 +0200)]
softwire: fix DMR parsing

10 years agoFix compiler warning
Steven Barth [Wed, 30 Apr 2014 15:49:32 +0000 (17:49 +0200)]
Fix compiler warning

10 years agoMAP: export type value in rules
Steven Barth [Wed, 30 Apr 2014 15:46:02 +0000 (17:46 +0200)]
MAP: export type value in rules

10 years agoFix MAP parameter parsing
Steven Barth [Wed, 30 Apr 2014 15:39:15 +0000 (17:39 +0200)]
Fix MAP parameter parsing

10 years agoIgnore multiple MAP-E instances for now and output DMR / BR for every rule
Steven Barth [Mon, 28 Apr 2014 17:39:10 +0000 (19:39 +0200)]
Ignore multiple MAP-E instances for now and output DMR / BR for every rule

10 years agoInitial support for MAP & LW4O6 provisioning
Steven Barth [Mon, 28 Apr 2014 09:37:13 +0000 (11:37 +0200)]
Initial support for MAP & LW4O6 provisioning

10 years agoFix fallout
Steven Barth [Wed, 9 Apr 2014 06:56:01 +0000 (08:56 +0200)]
Fix fallout

10 years agoRevert "Revert to old behaviour regarding information requests"
Steven Barth [Wed, 9 Apr 2014 06:47:53 +0000 (08:47 +0200)]
Revert "Revert to old behaviour regarding information requests"

This reverts commit c98181c4a48c57e405effd1dc9046aaaee6d480f.

10 years agoMerge pull request #19 from dedeckeh/bugfixes
sbyx [Thu, 3 Apr 2014 20:51:09 +0000 (22:51 +0200)]
Merge pull request #19 from dedeckeh/bugfixes

Add user-class option in help text and minor clean up

10 years agoAdd user-class option in help text and minor clean up
Hans Dedecker [Wed, 2 Apr 2014 20:30:48 +0000 (22:30 +0200)]
Add user-class option in help text and minor clean up

10 years agoCorrectly clear CER
Steven Barth [Tue, 1 Apr 2014 10:07:28 +0000 (12:07 +0200)]
Correctly clear CER

10 years agoDon't disable looping (meh)
Steven Barth [Tue, 1 Apr 2014 09:50:53 +0000 (11:50 +0200)]
Don't disable looping (meh)

10 years agoAdd initial support for CER-ID
Steven Barth [Sun, 30 Mar 2014 17:51:56 +0000 (19:51 +0200)]
Add initial support for CER-ID

10 years agoStop rebinding when all IAs are lost
Steven Barth [Mon, 24 Mar 2014 08:37:36 +0000 (09:37 +0100)]
Stop rebinding when all IAs are lost

10 years agoFix building with clang 3.4
Steven Barth [Tue, 18 Mar 2014 13:39:22 +0000 (14:39 +0100)]
Fix building with clang 3.4

10 years agoFix HMAC-MD5 verify in reconfigure
Steven Barth [Tue, 11 Mar 2014 08:18:32 +0000 (09:18 +0100)]
Fix HMAC-MD5 verify in reconfigure

10 years agofix integer overflow after 50 days (thx Hauke Mehrtens)
Steven Barth [Fri, 7 Mar 2014 09:33:49 +0000 (10:33 +0100)]
fix integer overflow after 50 days (thx Hauke Mehrtens)

10 years agora: don't set nd_ra_{reachable,retransmit} to 0
Steven Barth [Wed, 5 Mar 2014 08:11:24 +0000 (09:11 +0100)]
ra: don't set nd_ra_{reachable,retransmit} to 0

10 years agoSet default for min-update-interval to 30
Steven Barth [Wed, 5 Mar 2014 08:06:29 +0000 (09:06 +0100)]
Set default for min-update-interval to 30

10 years agoMerge pull request #18 from kaspar030/rebase
sbyx [Tue, 4 Mar 2014 17:21:04 +0000 (18:21 +0100)]
Merge pull request #18 from kaspar030/rebase

add option to specify minimum interval for accepting RA or DHCP updates.

10 years agoadd option to specify minimum interval for accepting RA or DHCP updates.
Kaspar Schleiser [Tue, 4 Mar 2014 15:29:02 +0000 (16:29 +0100)]
add option to specify minimum interval for accepting RA or DHCP updates.

This was fixed to 60s. Add '-m <seconds>' option to change default time.

10 years agoFix invalid use of open()
Steven Barth [Sat, 1 Mar 2014 12:31:33 +0000 (13:31 +0100)]
Fix invalid use of open()

10 years agoMake hex-string say base-16 encoded in help
Steven Barth [Wed, 19 Feb 2014 08:14:09 +0000 (09:14 +0100)]
Make hex-string say base-16 encoded in help

10 years agoReintroduce Reconfigure-Accept in Request-Message
Steven Barth [Mon, 17 Feb 2014 20:18:49 +0000 (21:18 +0100)]
Reintroduce Reconfigure-Accept in Request-Message

10 years agoMerge pull request #16 from kaspar030/use_enum_for_iov
sbyx [Wed, 12 Feb 2014 13:51:54 +0000 (14:51 +0100)]
Merge pull request #16 from kaspar030/use_enum_for_iov

use enum to specify order and indexes of iov struct in dhcp_send().

10 years agouse enum to specify order and indexes of iov struct.
Kaspar Schleiser [Wed, 12 Feb 2014 12:48:25 +0000 (13:48 +0100)]
use enum to specify order and indexes of iov struct.

This helps to avoid brainfuck index calculation errors when adding
features.

On my build machine (arch linux x86_64), the stripped binary has exactly
the same size, so this patch should produce the same binary, but
increase code maintainability.

10 years agoFix fallout from userclass addition
Steven Barth [Thu, 6 Feb 2014 10:08:51 +0000 (11:08 +0100)]
Fix fallout from userclass addition

10 years agoMerge pull request #15 from dedeckeh/bugfixes
sbyx [Thu, 6 Feb 2014 07:05:45 +0000 (08:05 +0100)]
Merge pull request #15 from dedeckeh/bugfixes

Bugfixes

10 years agoFix default sol max rt value in help text
Hans Dedecker [Wed, 5 Feb 2014 21:32:40 +0000 (22:32 +0100)]
Fix default sol max rt value in help text

10 years agoFix T1, T2 and T3 timer values in case of infinite time values
Hans Dedecker [Wed, 5 Feb 2014 21:28:50 +0000 (22:28 +0100)]
Fix T1, T2 and T3 timer values in case of infinite time values

Honor T1, T2 and T3 timer values from DHCPv6 server in case of infinite values

10 years agoAdd user-class option
Steven Barth [Wed, 5 Feb 2014 13:47:47 +0000 (14:47 +0100)]
Add user-class option

10 years agoRevert "RA: fix on-link/off-link handling"
Steven Barth [Mon, 3 Feb 2014 09:10:10 +0000 (10:10 +0100)]
Revert "RA: fix on-link/off-link handling"

New behavior breaks source-restrictions of on-link routes.

This reverts commit 9817e4983c7d4e28f53b78d4fc6ea1eabed8affe.

10 years agoRA: fix on-link/off-link handling
Steven Barth [Sun, 2 Feb 2014 17:40:50 +0000 (18:40 +0100)]
RA: fix on-link/off-link handling

10 years agoAdd example status script
Steven Barth [Wed, 29 Jan 2014 11:59:32 +0000 (12:59 +0100)]
Add example status script

10 years agoDon't export IAID as class if IAID is 1 (default)
Steven Barth [Wed, 29 Jan 2014 10:55:40 +0000 (11:55 +0100)]
Don't export IAID as class if IAID is 1 (default)

10 years agoBump copyright headers
Steven Barth [Wed, 29 Jan 2014 10:33:53 +0000 (11:33 +0100)]
Bump copyright headers

10 years agoMerge pull request #12 from kaspar030/pid_usage_filename_fix
sbyx [Wed, 29 Jan 2014 09:45:11 +0000 (01:45 -0800)]
Merge pull request #12 from kaspar030/pid_usage_filename_fix

fix pidfile default in help text

10 years agofix pidfile default in help text
Kaspar Schleiser [Wed, 29 Jan 2014 09:40:30 +0000 (10:40 +0100)]
fix pidfile default in help text

10 years agoFix stateless mode
Steven Barth [Tue, 28 Jan 2014 16:40:46 +0000 (17:40 +0100)]
Fix stateless mode

10 years agooutput prefix IAID as prefix class in script
Kaspar Schleiser [Fri, 24 Jan 2014 13:15:12 +0000 (14:15 +0100)]
output prefix IAID as prefix class in script

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agoadd support Vendor Class option
Kaspar Schleiser [Mon, 27 Jan 2014 12:43:38 +0000 (13:43 +0100)]
add support Vendor Class option

This patch adds cli option "-V <hex-string>" which will enable sending
of DHCPv6 option 16 ("vendor class").

Based on Patch by Christian Carstensen

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agoallow disabling "client fqdn" and "accept reconfiguration" options
Kaspar Schleiser [Thu, 23 Jan 2014 16:05:18 +0000 (17:05 +0100)]
allow disabling "client fqdn" and "accept reconfiguration" options

Some DHCPv6 servers require these to be absent, so add
command line switches that allow disabling them.

(includes "Combination of command line switches -f and -a
 broke "-N none" and IA_PD." from Christian Carstensen)

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agoadd support for multiple prefixes with distinct IAIDs
Kaspar Schleiser [Thu, 23 Jan 2014 15:39:43 +0000 (16:39 +0100)]
add support for multiple prefixes with distinct IAIDs

Changes from v1:
- removed some unneeded changes
- use *_add_state instead of (semantically identical and so unnecessary)
  *_append_state

This is missing IAID validation for prefixes.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agoadded command line switch for strict oro
Kaspar Schleiser [Thu, 9 Jan 2014 14:58:31 +0000 (15:58 +0100)]
added command line switch for strict oro

Now "-R" command line switch makes odhcpv6c only request those options
specified by "-r".

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agofix NTP server option handling
Kaspar Schleiser [Tue, 7 Jan 2014 12:58:38 +0000 (13:58 +0100)]
fix NTP server option handling

previously, only option 56 (NTP server) was supported, but named SNTP_*
throughout code and in the scripts environment. This patch fixes this and adds
optnion 31 (SNTP Servers) support. Uses NTP_IP and NTP_FQDN and SNTP_IP in
script environment.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

10 years agoMerge pull request #11 from NeoRaider/fixes
sbyx [Sat, 11 Jan 2014 10:36:49 +0000 (02:36 -0800)]
Merge pull request #11 from NeoRaider/fixes

A few fixes for race conditions and similar problems

10 years agoFix race conditions in signal handling
Matthias Schiffer [Fri, 10 Jan 2014 18:58:14 +0000 (19:58 +0100)]
Fix race conditions in signal handling

Avoid several race conditions by using distinct variables for the different
signals. In particular different signals received in quick succession don't
overwrite each other any more, and odhcp6c_signal_process doesn't return true
anymore when a new SIGIO is received while another is still being processed.

10 years agoUse getifaddrs to get the interface-id when not specified
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

10 years agoWhitespace fixes
Matthias Schiffer [Fri, 10 Jan 2014 12:10:37 +0000 (13:10 +0100)]
Whitespace fixes

Mostly trailing spaces or whitespace in empty lines.

10 years agoSwitch to a leaner MD5 library
Steven Barth [Sun, 5 Jan 2014 17:38:15 +0000 (18:38 +0100)]
Switch to a leaner MD5 library

10 years agoRevert to old behaviour regarding information requests
Steven Barth [Mon, 30 Dec 2013 18:10:18 +0000 (19:10 +0100)]
Revert to old behaviour regarding information requests

10 years agoRevert "Server unicast option support"
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

10 years agoFix compilation and cleanup
Steven Barth [Mon, 30 Dec 2013 17:33:25 +0000 (18:33 +0100)]
Fix compilation and cleanup

10 years agoMerge pull request #9 from dedeckeh/master
sbyx [Mon, 30 Dec 2013 17:15:54 +0000 (09:15 -0800)]
Merge pull request #9 from dedeckeh/master

10 years agoSupport for SOL_MAX_RT and INF_MAX_RT options (RFC7083)
Hans Dedecker [Mon, 30 Dec 2013 13:58:10 +0000 (14:58 +0100)]
Support for SOL_MAX_RT and INF_MAX_RT options (RFC7083)

10 years agoDrop DHCPv6 messages containing invalid option length
Hans Dedecker [Fri, 27 Dec 2013 14:55:24 +0000 (15:55 +0100)]
Drop DHCPv6 messages containing invalid option length

10 years agoRevert "Fix handling of DHCPv6 messages containing option lengths exceeding the message"
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.

10 years agoAdd ICMPv6 validity check
Hans Dedecker [Tue, 24 Dec 2013 16:22:05 +0000 (17:22 +0100)]
Add ICMPv6 validity check

10 years agoRevert "Fix parsing of Router Advertisement messsages"
Hans Dedecker [Tue, 24 Dec 2013 15:37:04 +0000 (16:37 +0100)]
Revert "Fix parsing of Router Advertisement messsages"

This reverts commit de89d2888d38d1ca6676070584ea6ff9c7dd6f23.

10 years agoParse Router Advertisement Hop Limit parameter
Hans Dedecker [Thu, 19 Dec 2013 15:40:39 +0000 (16:40 +0100)]
Parse Router Advertisement Hop Limit parameter

10 years agoFix parsing of Router Advertisement messsages
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

10 years agoFix handling of DHCPv6 messages containing option lengths exceeding the message
Hans Dedecker [Thu, 12 Dec 2013 16:05:25 +0000 (17:05 +0100)]
Fix handling of DHCPv6 messages containing option lengths exceeding the message

10 years agoFix server candidate selection logic
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

10 years agoFine tune server candidate selection logic
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

10 years agoBasic error checking when initializing ra
Hans Dedecker [Sun, 1 Dec 2013 17:55:11 +0000 (18:55 +0100)]
Basic error checking when initializing ra

10 years agoFix receive rounds end condition
Hans Dedecker [Sun, 1 Dec 2013 17:49:36 +0000 (18:49 +0100)]
Fix receive rounds end condition

10 years agoRemove setsockopt error checking
Hans Dedecker [Sun, 1 Dec 2013 17:47:19 +0000 (18:47 +0100)]
Remove setsockopt error checking

11 years agoServer unicast option support
Hans Dedecker [Wed, 13 Nov 2013 15:04:42 +0000 (16:04 +0100)]
Server unicast option support

11 years agoImproved message validation checks and socket error hardening
Hans Dedecker [Wed, 13 Nov 2013 15:03:34 +0000 (16:03 +0100)]
Improved message validation checks and socket error hardening

11 years agoFinalizing bfd work
Steven Barth [Mon, 11 Nov 2013 14:34:05 +0000 (15:34 +0100)]
Finalizing bfd work

11 years agoFix bfd ping
Steven Barth [Wed, 6 Nov 2013 12:04:53 +0000 (13:04 +0100)]
Fix bfd ping

11 years agoAdd experimental and unfinished bfd ping work
Steven Barth [Tue, 5 Nov 2013 07:56:29 +0000 (08:56 +0100)]
Add experimental and unfinished bfd ping work

11 years agoReact to carrier down events as well
Steven Barth [Wed, 30 Oct 2013 13:13:50 +0000 (14:13 +0100)]
React to carrier down events as well

11 years agoFix compilation on 32-bit platforms
Steven Barth [Wed, 30 Oct 2013 12:43:15 +0000 (13:43 +0100)]
Fix compilation on 32-bit platforms

11 years agoDetect "carrier up"-events and restart transaction
Steven Barth [Wed, 30 Oct 2013 12:37:05 +0000 (13:37 +0100)]
Detect "carrier up"-events and restart transaction

11 years agoMake -F and -P arguments position independent
Steven Barth [Tue, 29 Oct 2013 14:19:42 +0000 (15:19 +0100)]
Make -F and -P arguments position independent

11 years agoBe less verbose when sending solicits
Steven Barth [Tue, 29 Oct 2013 14:00:08 +0000 (15:00 +0100)]
Be less verbose when sending solicits

11 years agoFix RA spam filter logic
Steven Barth [Tue, 29 Oct 2013 13:52:16 +0000 (14:52 +0100)]
Fix RA spam filter logic

11 years agoFix compilation on 64-bit platforms
Steven Barth [Wed, 23 Oct 2013 17:28:52 +0000 (19:28 +0200)]
Fix compilation on 64-bit platforms

11 years agoodhpc6c: status code support in reply
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>
11 years agoodhcp6c: preference and status code support in advertise
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>
11 years agoodhcp6c: message retransmission count support
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>
11 years agoAvoid updating too often if ISP spams RAs
Steven Barth [Wed, 23 Oct 2013 08:13:00 +0000 (10:13 +0200)]
Avoid updating too often if ISP spams RAs

11 years agoFix handling of PD-Advertisements
Steven Barth [Thu, 17 Oct 2013 07:19:01 +0000 (09:19 +0200)]
Fix handling of PD-Advertisements

11 years agoMake SOL_MAX_RT configurable and default to 120
Steven Barth [Mon, 14 Oct 2013 13:29:39 +0000 (15:29 +0200)]
Make SOL_MAX_RT configurable and default to 120

11 years agoPrefer servers with bigger prefixes
Steven Barth [Mon, 14 Oct 2013 12:14:15 +0000 (14:14 +0200)]
Prefer servers with bigger prefixes

11 years agoDon't hang indefinitely if REQUEST is never answered
Steven Barth [Fri, 11 Oct 2013 07:33:00 +0000 (09:33 +0200)]
Don't hang indefinitely if REQUEST is never answered

11 years agoodhcp6c: improve server selection
Steven Barth [Mon, 7 Oct 2013 08:21:34 +0000 (10:21 +0200)]
odhcp6c: improve server selection

11 years agoCheck for local addr more often
Steven Barth [Fri, 4 Oct 2013 06:26:38 +0000 (08:26 +0200)]
Check for local addr more often

11 years agora: validate hop-limit
Steven Barth [Wed, 2 Oct 2013 14:10:43 +0000 (16:10 +0200)]
ra: validate hop-limit

11 years agoHandle NoAddrsAvail IA-status
Steven Barth [Sat, 21 Sep 2013 10:49:05 +0000 (12:49 +0200)]
Handle NoAddrsAvail IA-status

11 years agoRestart transaction if server returns IAID error code
Steven Barth [Wed, 18 Sep 2013 10:25:20 +0000 (12:25 +0200)]
Restart transaction if server returns IAID error code

11 years agoAdd default T1, T2, T3 for buggy servers
Steven Barth [Thu, 12 Sep 2013 12:48:57 +0000 (14:48 +0200)]
Add default T1, T2, T3 for buggy servers