sbyx [Tue, 12 Aug 2014 13:05:17 +0000 (15:05 +0200)]
Merge pull request #21 from mehlis/fix-nak-by-doing-valid-reply
dhcpv4: offer a valid configuration with DHCP NAK
Christian Mehlis [Tue, 12 Aug 2014 12:25:33 +0000 (14:25 +0200)]
dhcpv4: offer a valid configuration with DHCP NAK
On network change the client requests a non valid
configuration. In this case we have to reply with
a DHCP NAK. But this NAK can include a valid
configuration like an ACK does.
With this change iDevices and Androids can finish
DHCP even with wrong configuration in first
REQUEST with two packets and without any additional
timeouts and round trips.
sbyx [Tue, 12 Aug 2014 12:59:36 +0000 (14:59 +0200)]
Merge pull request #20 from mehlis/implement-dhcp4-router-config
dhcpv4: implement router configuration option
Christian Mehlis [Tue, 12 Aug 2014 12:58:06 +0000 (14:58 +0200)]
dhcpv4: implement router configuration option
RFC 2132 defines:
3.5. Router Option
The router option specifies a list of IP addresses for routers on the
client's subnet. Routers SHOULD be listed in order of preference.
The code for the router option is 3. The minimum length for the
router option is 4 octets, and the length MUST always be a multiple
of 4.
Code Len Address 1 Address 2
+-----+-----+-----+-----+-----+-----+-----+-----+--
| 3 | n | a1 | a2 | a3 | a4 | a1 | a2 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+--
Steven Barth [Fri, 8 Aug 2014 08:46:39 +0000 (10:46 +0200)]
Make failed to send a notice instead of a warning
Steven Barth [Fri, 8 Aug 2014 05:30:34 +0000 (07:30 +0200)]
Add host-entries for all IPv6 addresses
Steven Barth [Thu, 7 Aug 2014 18:08:31 +0000 (20:08 +0200)]
sync hostfile more often
Steven Barth [Thu, 7 Aug 2014 05:51:29 +0000 (07:51 +0200)]
ra: don't send MSR for /64 prefix if DP is /64 as well
Steven Barth [Wed, 23 Jul 2014 21:15:28 +0000 (23:15 +0200)]
Don't loose routes in managed PD
Steven Barth [Tue, 22 Jul 2014 21:35:52 +0000 (23:35 +0200)]
Revert "rewrite of NDP proxy" for now
Steven Barth [Mon, 21 Jul 2014 21:58:07 +0000 (23:58 +0200)]
Fix typo in ubus integration
Steven Barth [Thu, 17 Jul 2014 17:48:14 +0000 (19:48 +0200)]
Fix compilation
Steven Barth [Thu, 17 Jul 2014 15:53:40 +0000 (17:53 +0200)]
Add missing NDP sync features
Steven Barth [Wed, 16 Jul 2014 12:54:34 +0000 (14:54 +0200)]
Initial rewrite of NDP proxy
Steven Barth [Mon, 14 Jul 2014 13:39:12 +0000 (15:39 +0200)]
odhcpd: only enable packet socket if really needed
sbyx [Wed, 2 Jul 2014 07:28:10 +0000 (09:28 +0200)]
Merge pull request #18 from dedeckeh/bugfixes
Improved compliance with RFC3315
Hans Dedecker [Tue, 1 Jul 2014 19:38:01 +0000 (21:38 +0200)]
Replace option sol_max_rt by inf_max_rt in reply response to information request
Hans Dedecker [Tue, 1 Jul 2014 19:26:34 +0000 (21:26 +0200)]
DHCPv6 destination address check
As described in RFC3315 §15 any solicit, confirm, rebind or information request message is discarded if the destination address is unicast
Likewise any request (§18.2.1), renew (§18.2.3), release (§18.2.6) or decline (§18.2.7) message is discarded and the server replies with the status code use multicast.
Steven Barth [Tue, 1 Jul 2014 08:05:30 +0000 (10:05 +0200)]
DHCPv4: send DHCPNAK if requested addr != leased addr
sbyx [Tue, 1 Jul 2014 07:07:02 +0000 (09:07 +0200)]
Merge pull request #17 from mar-kolya/master
leasefile: do not output expired dhcpv6 leases
Nikolay Martynov [Tue, 1 Jul 2014 02:42:55 +0000 (22:42 -0400)]
leasefile: do not output expired dhcpv6 leases
Sometimes ip that is assigned to a host changes, old ip is still kept aroung as 'expired'.
This expired ip gets dumped into leasefile and is read by dnsmasq.
The result is that hotsname is resolved into expired ip and that confuses clients.
This patch prevents expired leases from being written into leasefile.
Steven Barth [Mon, 30 Jun 2014 07:57:01 +0000 (09:57 +0200)]
Fixes compile error with musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Steven Barth [Wed, 18 Jun 2014 12:05:42 +0000 (14:05 +0200)]
Fix DHCPv4 static leases (thanks arnd)
Steven Barth [Tue, 17 Jun 2014 07:59:57 +0000 (09:59 +0200)]
use leaetime as base for T1 and T2 upper bound
Steven Barth [Tue, 17 Jun 2014 07:37:55 +0000 (09:37 +0200)]
backup for notonlink
Steven Barth [Tue, 17 Jun 2014 07:28:37 +0000 (09:28 +0200)]
Make hostid more convenient
Steven Barth [Tue, 17 Jun 2014 06:20:53 +0000 (08:20 +0200)]
dhcpv6: send NotOnLink status on global level
Steven Barth [Mon, 16 Jun 2014 16:25:56 +0000 (18:25 +0200)]
add more consistency to host file writing
Steven Barth [Mon, 16 Jun 2014 09:05:03 +0000 (11:05 +0200)]
dhcpv4: update hostfile more often
Steven Barth [Mon, 16 Jun 2014 08:11:12 +0000 (10:11 +0200)]
Fix option id for hostnames
Steven Barth [Sun, 15 Jun 2014 22:50:17 +0000 (00:50 +0200)]
config: accept domains with trailing .
Steven Barth [Thu, 12 Jun 2014 08:01:06 +0000 (10:01 +0200)]
dhcpv4: use search domain instead of domain option
Steven Barth [Tue, 10 Jun 2014 08:40:14 +0000 (10:40 +0200)]
Fix DHCP settings for /28
sbyx [Tue, 10 Jun 2014 03:38:14 +0000 (05:38 +0200)]
Merge pull request #14 from dedeckeh/bugfixes
Fix DHCPv6 relay reply message in case raw DHCPv6 attributes are present
Hans Dedecker [Mon, 9 Jun 2014 19:31:40 +0000 (21:31 +0200)]
Fix DHCPv6 relay reply message in case raw DHCPv6 attributes are present
Use enum to index iov struct
Steven Barth [Sat, 7 Jun 2014 10:34:48 +0000 (12:34 +0200)]
Add default DHCPv4 range for prefixes down to /28
Steven Barth [Fri, 30 May 2014 14:59:53 +0000 (16:59 +0200)]
Make filtering customizable
Steven Barth [Thu, 29 May 2014 21:00:16 +0000 (23:00 +0200)]
Move dhcpv6 raw attributes to correct place
Steven Barth [Sun, 25 May 2014 12:14:52 +0000 (14:14 +0200)]
Add support for raw DHCPv6 attributes
sbyx [Thu, 24 Apr 2014 09:07:19 +0000 (11:07 +0200)]
Merge pull request #13 from dedeckeh/bugfixes
Bugfixes
Hans Dedecker [Wed, 16 Apr 2014 14:39:05 +0000 (16:39 +0200)]
Add status code ok option in reply to a decline message
RFC3315 Section 18.2.7 states a status code OK needs to be returned by the server :
After all the addresses have been processed, the server generates a Reply message and
includes a Status Code option with the value Success, a Server Identifier option with
the server's DUID, and a Client Identifier option with the client's DUID.
Hans Dedecker [Wed, 16 Apr 2014 09:53:32 +0000 (11:53 +0200)]
Don't return a DHCPv6 reply in response to a confirm without address(es)
RFC3315 Section 18.2.2 states no reply must returned by the server in case no address(es) are present :
If the server is unable to perform this test (for example, the server does not have information about prefixes on the link to which the client is connected),
or there were no addresses in any of the IAs sent by the client, the server MUST NOT send a reply to the client.
Steven Barth [Wed, 9 Apr 2014 12:24:31 +0000 (14:24 +0200)]
config: use correct defaults if interface is not in UCI
Steven Barth [Sun, 6 Apr 2014 14:27:27 +0000 (16:27 +0200)]
odhcpd: managed PD wait for 250ms initial period
Steven Barth [Thu, 3 Apr 2014 09:53:26 +0000 (11:53 +0200)]
Make clang happy
Steven Barth [Tue, 1 Apr 2014 16:39:38 +0000 (18:39 +0200)]
Keep managed PD for at least 150 seconds
Steven Barth [Tue, 1 Apr 2014 16:16:27 +0000 (18:16 +0200)]
Wait at least 15 seconds for managed PD to be acknowledged
Steven Barth [Tue, 1 Apr 2014 16:02:37 +0000 (18:02 +0200)]
don't kill of managed PD too early
Steven Barth [Tue, 1 Apr 2014 09:19:31 +0000 (11:19 +0200)]
Complete managed PD/CER-ID support
Steven Barth [Mon, 24 Mar 2014 09:01:54 +0000 (10:01 +0100)]
Managed PD: initial support
Steven Barth [Thu, 20 Mar 2014 11:59:15 +0000 (12:59 +0100)]
ubus: convert to async calls
Steven Barth [Thu, 20 Mar 2014 10:18:02 +0000 (11:18 +0100)]
ubus: use safe iterator
Steven Barth [Thu, 20 Mar 2014 09:37:38 +0000 (10:37 +0100)]
ubus: don't redeclare variable c
Steven Barth [Thu, 20 Mar 2014 09:30:51 +0000 (10:30 +0100)]
Don't segfault when there is no IPv6 support
Steven Barth [Tue, 11 Mar 2014 08:17:08 +0000 (09:17 +0100)]
Fix HMAC-MD5 in DHCPv6-reconfigure (thx rsmarples)
Steven Barth [Tue, 25 Feb 2014 11:39:34 +0000 (12:39 +0100)]
config: more static ndp fixes
Hans Dedecker [Sat, 22 Feb 2014 08:22:37 +0000 (09:22 +0100)]
Fix parsing of static ndp entries
Steven Barth [Mon, 24 Feb 2014 13:36:28 +0000 (14:36 +0100)]
Don't announce :: as DNS
Steven Barth [Mon, 24 Feb 2014 13:29:31 +0000 (14:29 +0100)]
Fix DNS-server and routes announced in RA for certain prefix cases
Steven Barth [Fri, 21 Feb 2014 18:00:06 +0000 (19:00 +0100)]
Fix wrong address pool being advertised
Steven Barth [Wed, 19 Feb 2014 12:34:10 +0000 (13:34 +0100)]
Replace IN6_ARE_ADDR_EQUAL by memcmp to avoid unaligneds
Steven Barth [Tue, 18 Feb 2014 08:36:29 +0000 (09:36 +0100)]
Avoid some bloat
Steven Barth [Mon, 17 Feb 2014 20:08:29 +0000 (21:08 +0100)]
Add support for (managed) prefixes of length 65-96
Steven Barth [Mon, 17 Feb 2014 13:15:27 +0000 (14:15 +0100)]
Dynamically calculate RA intervals when prefix lifetimes are short
Steven Barth [Wed, 5 Feb 2014 15:41:51 +0000 (16:41 +0100)]
Fix homenet filter
Steven Barth [Sat, 1 Feb 2014 12:01:37 +0000 (13:01 +0100)]
Change homenet detection to User-Class
sbyx [Thu, 23 Jan 2014 10:58:32 +0000 (02:58 -0800)]
Merge pull request #9 from dedeckeh/bugfixes
Fix ra_management and ndproxy_routing config overwrite
Hans Dedecker [Thu, 23 Jan 2014 09:53:22 +0000 (10:53 +0100)]
Fix ra_management and ndproxy_routing config overwrite
Set default values for the ra_management and ndproxy_routing
config parameters if no attributes are present and overwrite is
to true.
Hans Dedecker [Thu, 23 Jan 2014 09:44:22 +0000 (10:44 +0100)]
Merge remote branch 'upstream/master' into bugfixes
Hans Dedecker [Thu, 23 Jan 2014 08:49:42 +0000 (09:49 +0100)]
Merge remote branch 'upstream/master' into bugfixes
Steven Barth [Sat, 18 Jan 2014 10:09:26 +0000 (11:09 +0100)]
Fix another memory corruption
Steven Barth [Sat, 18 Jan 2014 09:55:56 +0000 (10:55 +0100)]
Fix memory corruption when reloading static leases
Steven Barth [Fri, 17 Jan 2014 19:06:46 +0000 (20:06 +0100)]
Don't enable relay master if no slaves are present
Steven Barth [Fri, 17 Jan 2014 15:55:33 +0000 (16:55 +0100)]
Fix logging verbosity
Steven Barth [Fri, 17 Jan 2014 15:47:31 +0000 (16:47 +0100)]
Use hybrid management mode by default
Steven Barth [Fri, 17 Jan 2014 13:04:36 +0000 (14:04 +0100)]
Fix a segfault in state-script handling
Steven Barth [Fri, 17 Jan 2014 11:23:59 +0000 (12:23 +0100)]
Fix prefix detection for hybrid mode
sbyx [Thu, 16 Jan 2014 23:46:27 +0000 (15:46 -0800)]
Merge pull request #8 from dedeckeh/bugfixes
Don't rearm RS timer if callback is not set
Hans Dedecker [Thu, 16 Jan 2014 10:33:34 +0000 (11:33 +0100)]
Merge remote branch 'upstream/master' into bugfixes
Hans Dedecker [Wed, 15 Jan 2014 13:46:44 +0000 (14:46 +0100)]
Don't rearm rs timer if callback is not set
Steven Barth [Wed, 15 Jan 2014 12:07:56 +0000 (13:07 +0100)]
Export hostname including domain in hostfile
sbyx [Tue, 14 Jan 2014 14:53:10 +0000 (06:53 -0800)]
Merge pull request #7 from dedeckeh/bugfixes
Fix interface ignore overwrite
Hans Dedecker [Mon, 13 Jan 2014 16:42:19 +0000 (17:42 +0100)]
Fix interface ignore overwrite
Don't overwrite interface ignore uci parameter when resolving ifindex.
Don't put interface in use when ifindex is unknown as interface
cannot be setup and needs to be closed.
sbyx [Thu, 9 Jan 2014 09:47:30 +0000 (01:47 -0800)]
Merge pull request #6 from dedeckeh/bugfixes
Fix ALL_DHCPV6_RELAYS/ALL_DHCPV6_SERVERS membership subscription
Hans Dedecker [Thu, 9 Jan 2014 09:09:12 +0000 (10:09 +0100)]
Fix ALL_DHCPV6_RELAYS/ALL_DHCPV6_SERVERS membership subscription
Steven Barth [Tue, 7 Jan 2014 07:53:44 +0000 (08:53 +0100)]
Rename legacy to maindhcp
Steven Barth [Mon, 6 Jan 2014 10:08:25 +0000 (11:08 +0100)]
don't run state update script unnecessarily often
Steven Barth [Sat, 4 Jan 2014 09:14:59 +0000 (10:14 +0100)]
Use 1 socket per interface for DHCPv6
Steven Barth [Fri, 3 Jan 2014 11:51:49 +0000 (12:51 +0100)]
derive ipv6 static lease from ipv4 if no hostid is given
Steven Barth [Fri, 3 Jan 2014 11:17:22 +0000 (12:17 +0100)]
Use OpenWrt standard lease format
Steven Barth [Fri, 3 Jan 2014 11:04:15 +0000 (12:04 +0100)]
Learn routes in NDP-proxy by default
Steven Barth [Fri, 3 Jan 2014 10:40:07 +0000 (11:40 +0100)]
Remove ula_compat feature
Steven Barth [Fri, 3 Jan 2014 09:19:42 +0000 (10:19 +0100)]
switch to libubox md5 implementation
Steven Barth [Fri, 3 Jan 2014 09:16:42 +0000 (10:16 +0100)]
fix ifindex detection
Steven Barth [Fri, 3 Jan 2014 09:07:33 +0000 (10:07 +0100)]
Disable debugging by default
Steven Barth [Tue, 31 Dec 2013 09:10:12 +0000 (10:10 +0100)]
ndp: Enable ping6 keep-alive
Steven Barth [Mon, 30 Dec 2013 08:09:22 +0000 (09:09 +0100)]
Make ubus optional
Steven Barth [Mon, 23 Dec 2013 13:06:45 +0000 (14:06 +0100)]
Readd fixed ICMPv6 validity check
Steven Barth [Sat, 21 Dec 2013 13:44:49 +0000 (14:44 +0100)]
Revert "Router Advertisement/Solicitation sanity check"
This reverts commit
3f417e55d5208df5b91aa9b101657bbc7a461614.
Steven Barth [Thu, 12 Dec 2013 16:36:06 +0000 (17:36 +0100)]
Revert "Fix Router Advertisement/Solicitation option parsing"
This reverts commit
f5877367522aad0b27d138e4a56d01be3bd33f2d.