odhcp6c.git
4 years agodhcpv6: clear CUSTOM_OPTS in a more sane manner
Steven Barth [Tue, 9 Jun 2015 12:04:59 +0000 (14:04 +0200)]
dhcpv6: clear CUSTOM_OPTS in a more sane manner

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoFix LW4over6 parameter handling
Steven Barth [Sat, 16 May 2015 07:28:01 +0000 (09:28 +0200)]
Fix LW4over6 parameter handling

4 years agoMerge pull request #33 from themiron/master
Steven Barth [Sat, 25 Apr 2015 16:49:59 +0000 (18:49 +0200)]
Merge pull request #33 from themiron/master

Avoid of waiting for Advertise in stateless-only mode

4 years agoAvoid of waiting for Advertise in stateless-only mode
Vladislav Grishenko [Sat, 25 Apr 2015 15:52:57 +0000 (20:52 +0500)]
Avoid of waiting for Advertise in stateless-only mode

Start with Information-request when configured not to ask
IA_NA/IA_PD. It allows to complete the exchange using only
two messages, instead of four, and fixes infinite Advertise
waiting loop with servers that just ignore Solicit messages.

4 years agoFixup INF_MAX_RT for RFC 3315 as well
Steven Barth [Mon, 20 Apr 2015 09:59:56 +0000 (11:59 +0200)]
Fixup INF_MAX_RT for RFC 3315 as well

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoFix SOL_MAX_RT default value to match RFC 3315
Steven Barth [Mon, 20 Apr 2015 09:16:21 +0000 (11:16 +0200)]
Fix SOL_MAX_RT default value to match RFC 3315

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoexample: actually chmod new resolv.conf after overwriting
Steven Barth [Wed, 15 Apr 2015 13:02:55 +0000 (15:02 +0200)]
example: actually chmod new resolv.conf after overwriting

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agora: avoid saving an empty search domain entry
Steven Barth [Wed, 15 Apr 2015 12:55:57 +0000 (14:55 +0200)]
ra: avoid saving an empty search domain entry

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoscan-code fixes
Steven Barth [Tue, 14 Apr 2015 06:24:44 +0000 (08:24 +0200)]
scan-code fixes

4 years agoImprove handling of DNS search domains
Steven Barth [Mon, 13 Apr 2015 12:48:52 +0000 (14:48 +0200)]
Improve handling of DNS search domains

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoFix odhcp6c_find_entry
Steven Barth [Sun, 12 Apr 2015 12:02:59 +0000 (14:02 +0200)]
Fix odhcp6c_find_entry

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoRemove obsolete prefix class support
Steven Barth [Sun, 12 Apr 2015 07:15:22 +0000 (09:15 +0200)]
Remove obsolete prefix class support

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoSanitize RA values less
Steven Barth [Fri, 10 Apr 2015 11:31:56 +0000 (13:31 +0200)]
Sanitize RA values less

4 years agoPass ICMP configuration to user-space instead of directly applying it
Steven Barth [Fri, 10 Apr 2015 11:19:44 +0000 (13:19 +0200)]
Pass ICMP configuration to user-space instead of directly applying it

4 years agoUpdate README
Steven Barth [Thu, 9 Apr 2015 08:16:02 +0000 (10:16 +0200)]
Update README

4 years agoscript: don't resolve AFTR since DNS won't be applied yet anyway
Steven Barth [Thu, 9 Apr 2015 07:51:39 +0000 (09:51 +0200)]
script: don't resolve AFTR since DNS won't be applied yet anyway

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoproperly handle return codes
John Crispin [Sat, 28 Mar 2015 16:58:44 +0000 (17:58 +0100)]
properly handle return codes

Signed-off-by: John Crispin <blogic@openwrt.org>
4 years agora: use proper struct msghdr initializer to fix build error on musl
Felix Fietkau [Sun, 29 Mar 2015 02:35:17 +0000 (04:35 +0200)]
ra: use proper struct msghdr initializer to fix build error on musl

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
4 years agomake route metric more compatible with linux defaults
Steven Barth [Wed, 25 Mar 2015 18:23:59 +0000 (19:23 +0100)]
make route metric more compatible with linux defaults

4 years agoGet rid of getifaddrs for interface ID detection
Steven Barth [Wed, 11 Mar 2015 09:06:54 +0000 (10:06 +0100)]
Get rid of getifaddrs for interface ID detection

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoMerge pull request #30 from themiron/master
Steven Barth [Tue, 17 Feb 2015 17:43:35 +0000 (18:43 +0100)]
Merge pull request #30 from themiron/master

Fix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD options

4 years agoFix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD options
Vladislav Grishenko [Tue, 17 Feb 2015 17:28:45 +0000 (22:28 +0500)]
Fix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD options

4 years agoexample: prevent script from running in parallel to avoid races
Steven Barth [Tue, 17 Feb 2015 13:41:04 +0000 (14:41 +0100)]
example: prevent script from running in parallel to avoid races

4 years agoset default information refresh time to 86400 as per RFC 4242
Steven Barth [Tue, 13 Jan 2015 08:36:42 +0000 (09:36 +0100)]
set default information refresh time to 86400 as per RFC 4242

4 years agoREADME: adjust for a bit of feature creep
Steven Barth [Tue, 6 Jan 2015 13:29:47 +0000 (14:29 +0100)]
README: adjust for a bit of feature creep

4 years agoMerge pull request #28 from janakj/master
Steven Barth [Wed, 31 Dec 2014 14:49:47 +0000 (15:49 +0100)]
Merge pull request #28 from janakj/master

Minor help string clarification for client-ID

4 years agoMinor help string clarification for client-ID
Jan Janak [Wed, 31 Dec 2014 14:22:35 +0000 (15:22 +0100)]
Minor help string clarification for client-ID

Document that the value of -c must be a 16-bit type (network byte order) followed by a client-ID value.
For example, to use a UUID based client-ID (type 4, RFC 6355) one could use the following cmdline option:
  -c0004<128_bit_uuid_in_hex>

4 years agoAvoid sending empty DHCPv6 release messages
Steven Barth [Wed, 10 Dec 2014 10:40:40 +0000 (11:40 +0100)]
Avoid sending empty DHCPv6 release messages

4 years agoDon't apply excess filter to DHCPv6 and unify odhcp6c_update_entry
Steven Barth [Wed, 10 Dec 2014 10:38:20 +0000 (11:38 +0100)]
Don't apply excess filter to DHCPv6 and unify odhcp6c_update_entry

4 years agoMore compatibility with non RFC-compliant servers
Steven Barth [Sun, 30 Nov 2014 19:25:45 +0000 (20:25 +0100)]
More compatibility with non RFC-compliant servers

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoCleanup pidfile-gerneration
Steven Barth [Fri, 28 Nov 2014 09:20:35 +0000 (10:20 +0100)]
Cleanup pidfile-gerneration

4 years agoBe less picky when erroring out due to strange IA status-codes
Steven Barth [Fri, 28 Nov 2014 00:36:44 +0000 (01:36 +0100)]
Be less picky when erroring out due to strange IA status-codes

4 years agoFix initial delay of SOLICIT message
Steven Barth [Fri, 28 Nov 2014 00:29:59 +0000 (01:29 +0100)]
Fix initial delay of SOLICIT message

Signed-off-by: Steven Barth <steven@midlink.org>
4 years agoFix msghdr initialization on musl
Steven Barth [Tue, 18 Nov 2014 09:36:06 +0000 (10:36 +0100)]
Fix msghdr initialization on musl

4 years agoBe less verbose by default and add -v flag
Steven Barth [Tue, 18 Nov 2014 09:25:22 +0000 (10:25 +0100)]
Be less verbose by default and add -v flag

4 years agoupdate cer-id definition
Steven Barth [Thu, 13 Nov 2014 11:54:54 +0000 (12:54 +0100)]
update cer-id definition

4 years agosoftwires: avoid unnecessary allocations
Steven Barth [Sat, 25 Oct 2014 10:37:01 +0000 (12:37 +0200)]
softwires: avoid unnecessary allocations

4 years agoMerge pull request #24 from themiron/master
sbyx [Fri, 10 Oct 2014 14:25:10 +0000 (16:25 +0200)]
Merge pull request #24 from themiron/master

Fix parsing empty IA_NA, IA_PD and invalid IA_ADDR options

4 years agoFix parsing empty IA_NA, IA_PD and invalid IA_ADDR options
Vladislav Grishenko [Fri, 10 Oct 2014 12:18:42 +0000 (18:18 +0600)]
Fix parsing empty IA_NA, IA_PD and invalid IA_ADDR options

4 years agoMerge pull request #23 from dedeckeh/bugfixes
sbyx [Wed, 8 Oct 2014 13:59:44 +0000 (15:59 +0200)]
Merge pull request #23 from dedeckeh/bugfixes

odhcp6c: Set bound state true before script_call in statefull mode

4 years agoodhcp6c: Set bound state true before script_call in statefull mode
Hans Dedecker [Wed, 8 Oct 2014 13:43:21 +0000 (15:43 +0200)]
odhcp6c: Set bound state true before script_call in statefull mode

4 years agoscript: don't leak IA_PD / IA_NA if not yet bound
Steven Barth [Wed, 8 Oct 2014 13:02:27 +0000 (15:02 +0200)]
script: don't leak IA_PD / IA_NA if not yet bound

4 years agoEnsure signal-safety of signal handlers
Steven Barth [Wed, 8 Oct 2014 09:57:07 +0000 (11:57 +0200)]
Ensure signal-safety of signal handlers

4 years agoExport DHCPv6 server address to env
Steven Barth [Mon, 6 Oct 2014 08:29:43 +0000 (10:29 +0200)]
Export DHCPv6 server address to env

4 years agoSend RS alternatingly with and without source MAC
Steven Barth [Sat, 27 Sep 2014 16:54:43 +0000 (18:54 +0200)]
Send RS alternatingly with and without source MAC

4 years agoEnable softwire-support by default
Steven Barth [Mon, 25 Aug 2014 06:08:56 +0000 (08:08 +0200)]
Enable softwire-support by default

4 years agoAlso test for correct IA-ID for IA_NA
Steven Barth [Fri, 22 Aug 2014 14:09:34 +0000 (16:09 +0200)]
Also test for correct IA-ID for IA_NA

4 years agoia_na: use big-endian 1 as IAID
Steven Barth [Fri, 22 Aug 2014 14:07:37 +0000 (16:07 +0200)]
ia_na: use big-endian 1 as IAID

5 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)

5 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

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

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

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

5 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

5 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

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

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

5 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

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

5 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

5 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

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

5 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.

5 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

5 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

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

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

5 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

5 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

5 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

5 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

5 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)

5 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

5 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

5 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.

5 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.

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

5 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

5 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

5 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().

5 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.

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

5 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

5 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

5 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

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

5 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.

5 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

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

5 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)

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

5 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

5 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

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

5 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

5 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

5 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

5 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

5 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

5 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