Hans Dedecker [Mon, 21 Nov 2016 13:42:16 +0000 (14:42 +0100)]
odhcpd: Display infinite valid lifetime as -1
Display infinite valid lifetime as -1 both in ubus
and statefile
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Karl Palsson [Wed, 28 Sep 2016 16:32:41 +0000 (16:32 +0000)]
Respect interface "ignore" settings as documented.
The "ignore" option is correctly loaded. Actually observe it as
documented.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Karl Palsson [Wed, 28 Sep 2016 16:32:39 +0000 (16:32 +0000)]
enable loglevel setting via command line
Currently the loglevel is hardcoded to LOG_WARNING, even though there is
debug log messages. Allow setting the loglevel via cli option.
Include basic help text because we're adding command line options.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Hans Dedecker [Thu, 17 Nov 2016 15:12:00 +0000 (16:12 +0100)]
dhcpv4: Adding DHCP client leasetime request support
Add support for DHCPv4 clients proposing a leasetime;
proposed leasetime will be accepted if it does not
exceed either the pool or configured lease leastime.
Further rework the duplicated leasetime logic which
was in place.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Thu, 17 Nov 2016 15:11:59 +0000 (16:11 +0100)]
dhcpv6-ia: Display infinite lifetime as INT32_MAX in state file
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Thu, 17 Nov 2016 15:11:58 +0000 (16:11 +0100)]
ubus: Fix displayed valid paramater for both DHCPv4 and DHCPv6 lease
Fix ubus valid parameter being displayed as a negative number;
also display infinite lifetime as INT32_MAX
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Thu, 17 Nov 2016 15:11:57 +0000 (16:11 +0100)]
dhcpv4: Keep DHCPv4 assignment lifetime value in sync with assigned leasetime
Keep the valid_until assignment parameter in sync with the
leasetime assigned to the DHCP client when handling DHCP
request message.
This guarantees the contents of the ubus dhcp ipv4leases valid
parameter is in sync with the client leasetime
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Thu, 17 Nov 2016 15:11:56 +0000 (16:11 +0100)]
config: Support infinite as DHCP pool leasetime value
Add support for infinite leasetime value; this can be done by
specifying "infinite" as leasetime value which is similar to
dnsmasq infinite leasetime support.
Specifying "infinite" as leasetime is valid for both the host
and dhcp uci sections.
A DHCPv4/DHCPv6 assignment is now considered infinite if valid_unil
holds the value 0.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Massimiliano Stucchi [Wed, 22 Jun 2016 08:22:41 +0000 (10:22 +0200)]
Correct a typo
Karl Palsson [Thu, 22 Sep 2016 17:32:18 +0000 (17:32 +0000)]
odhcpd: remove superfluous log output.
Drop pointless syslog. The single line just doubles the amount of lines
logged to syslog without adding any value.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Steven Barth [Thu, 19 May 2016 06:54:24 +0000 (08:54 +0200)]
Add per-host leasetime support
Patch by Daniel Dickinson
Signed-off-by: Steven Barth <steven@midlink.org>
Steven Barth [Sun, 31 Jan 2016 15:19:05 +0000 (16:19 +0100)]
Merge pull request #68 from dedeckeh/bugfixes
config: blobmsg_check_attr expects bool type as last argument
Hans Dedecker [Tue, 15 Dec 2015 14:32:33 +0000 (15:32 +0100)]
config: blobmsg_check_attr expects bool type as last argument
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Steven Barth [Sun, 29 Nov 2015 11:51:28 +0000 (12:51 +0100)]
Merge pull request #67 from dedeckeh/bugfixes
Fix interface ifname overwrite in case UCI dhcp section contains ifname or networkid parameter
Hans Dedecker [Fri, 27 Nov 2015 12:34:01 +0000 (13:34 +0100)]
config: Prioritize ifname resolving via ubus over ifname/networkid attributes
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker [Fri, 27 Nov 2015 10:30:41 +0000 (11:30 +0100)]
config: Close interface when ifindex cannot be resolved
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Steven Barth [Tue, 17 Nov 2015 07:44:07 +0000 (08:44 +0100)]
fall through in error case to clear congestion
Steven Barth [Mon, 16 Nov 2015 11:10:24 +0000 (12:10 +0100)]
Handle netlink ENOBUFS events
Steven Barth [Wed, 21 Oct 2015 06:47:26 +0000 (08:47 +0200)]
Merge pull request #63 from willmo/router-lifetime
Clamp router lifetime per RFC 4861
Will Mortensen [Mon, 19 Oct 2015 03:50:56 +0000 (20:50 -0700)]
Don't overflow router lifetime
When a prefix lifetime was greater than UINT16_MAX, we would advertise a
shorter router lifetime (even potentially 0). Saturate instead.
Steven Barth [Wed, 21 Oct 2015 06:07:52 +0000 (08:07 +0200)]
Merge pull request #62 from willmo/dns-lifetime
Correctly byteswap DNS lifetimes in RAs
Will Mortensen [Mon, 19 Oct 2015 03:59:20 +0000 (20:59 -0700)]
Correctly byteswap DNS lifetimes in RAs
Steven Barth [Mon, 7 Sep 2015 13:28:10 +0000 (15:28 +0200)]
dhcpv6: use correct length when copying duid
Steven Barth [Mon, 7 Sep 2015 09:48:05 +0000 (11:48 +0200)]
router: don't announce as default router if we aren't
Steven Barth [Mon, 7 Sep 2015 09:39:19 +0000 (11:39 +0200)]
router: reduce dns lifetime to 10x maximum interval
Steven Barth [Mon, 7 Sep 2015 09:21:58 +0000 (11:21 +0200)]
dhcpv6: fix mac-handling
Steven Barth [Tue, 1 Sep 2015 13:29:31 +0000 (15:29 +0200)]
Fixup RAs/DHCPv6 announcing incorrect addresses
Steven Barth [Thu, 20 Aug 2015 09:33:23 +0000 (11:33 +0200)]
router/dhcpv6: use link-local addresses for DNS
Steven Barth [Thu, 20 Aug 2015 08:45:31 +0000 (10:45 +0200)]
router: improve deprecation handling
Steven Barth [Thu, 20 Aug 2015 08:42:09 +0000 (10:42 +0200)]
Merge pull request #56 from sbyx/revert-46-master
Revert "RFC: dhcpv4 support openwrt alias ip addr"
Steven Barth [Thu, 20 Aug 2015 08:42:02 +0000 (10:42 +0200)]
Revert "RFC: dhcpv4 support openwrt alias ip addr"
Steven Barth [Thu, 20 Aug 2015 06:12:30 +0000 (08:12 +0200)]
Merge pull request #54 from dedeckeh/bugfixes
Fixes compile issues and infinite lifetimes
Steven Barth [Thu, 20 Aug 2015 05:47:02 +0000 (07:47 +0200)]
Merge pull request #46 from stargieg/master
RFC: dhcpv4 support openwrt alias ip addr
Hans Dedecker [Mon, 10 Aug 2015 16:31:46 +0000 (18:31 +0200)]
router: Fix infinite lifetimes
Hans Dedecker [Mon, 10 Aug 2015 16:07:13 +0000 (18:07 +0200)]
router: Fix compile issues
Fix compile issue due to comparison between signed and unsigned integers
Steven Barth [Mon, 27 Jul 2015 21:21:57 +0000 (23:21 +0200)]
ra/dhcpv6: unify address change handling
Steven Barth [Fri, 24 Jul 2015 13:46:55 +0000 (15:46 +0200)]
Fix RA lifetimes
Steven Barth [Fri, 17 Jul 2015 11:06:19 +0000 (13:06 +0200)]
dhcpv6: fix socket generation on relay master
Steven Barth [Fri, 17 Jul 2015 08:46:07 +0000 (10:46 +0200)]
dhcpv6: send relay-forward messages using correct socket
Steven Barth [Wed, 15 Jul 2015 07:37:52 +0000 (09:37 +0200)]
router: unify RA router and DNS lifetime
Steven Barth [Wed, 15 Jul 2015 06:56:53 +0000 (08:56 +0200)]
router: fixup RA lifetime calculation
Steven Barth [Tue, 14 Jul 2015 19:49:57 +0000 (21:49 +0200)]
router: fix invalid router lifetime
Steven Barth [Tue, 14 Jul 2015 19:44:08 +0000 (21:44 +0200)]
router: fix logic inversion
Steven Barth [Tue, 14 Jul 2015 18:49:02 +0000 (20:49 +0200)]
ndp: reintroduce address replay
Steven Barth [Tue, 14 Jul 2015 15:56:38 +0000 (17:56 +0200)]
Remove unsolicited unicast RAs, adjust intervals
Steven Barth [Tue, 14 Jul 2015 09:05:31 +0000 (11:05 +0200)]
ndp: fixup relay
Steven Barth [Mon, 13 Jul 2015 21:08:19 +0000 (23:08 +0200)]
ndp: remove bindtodevice workaround
Steven Barth [Mon, 13 Jul 2015 21:01:19 +0000 (23:01 +0200)]
odhcpd: remove old workaround
Steven Barth [Mon, 13 Jul 2015 20:46:25 +0000 (22:46 +0200)]
ndp: fixup route replication
Steven Barth [Mon, 13 Jul 2015 20:14:07 +0000 (22:14 +0200)]
router: only send RAs to neighbors if unsolicited
Steven Barth [Mon, 13 Jul 2015 20:08:17 +0000 (22:08 +0200)]
router: only send direct RAs to link-local addresses
Steven Barth [Tue, 7 Jul 2015 14:04:05 +0000 (16:04 +0200)]
main: fix missing parameter while iterating neighbors
Steven Barth [Tue, 7 Jul 2015 14:01:13 +0000 (16:01 +0200)]
router: also send RAs to every known neighbor
Steven Barth [Tue, 7 Jul 2015 13:42:55 +0000 (15:42 +0200)]
ndp: replay on-link routes instead of address assignments
Steven Barth [Tue, 30 Jun 2015 09:06:20 +0000 (11:06 +0200)]
ra: keep alive neighbor entries so we can send unicast RAs in the future
Patrick Grimm [Mon, 22 Jun 2015 14:22:36 +0000 (16:22 +0200)]
dhcpv4: remove unused addr_attrs struct
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Mon, 22 Jun 2015 14:16:04 +0000 (16:16 +0200)]
dhcpv4: add ifdef ubus for dhcp4 ip
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Thu, 18 Jun 2015 23:30:29 +0000 (01:30 +0200)]
dhcpv4: add in_addr dhcpv4_mask and in_addr dhcpv4_addr to struct interface
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Thu, 18 Jun 2015 02:45:45 +0000 (04:45 +0200)]
dhcpv4: fix unitialization of mask
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Thu, 18 Jun 2015 02:27:24 +0000 (04:27 +0200)]
dhcpv4: fix char ubus_get_address4 int ubus_get_mask4 function
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Mon, 15 Jun 2015 01:39:59 +0000 (03:39 +0200)]
dhcpv4: add ubus_get_address4 ubus_get_mask4 function
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Mon, 15 Jun 2015 01:38:09 +0000 (03:38 +0200)]
dhcpv4: return pointer
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Mon, 15 Jun 2015 01:36:15 +0000 (03:36 +0200)]
dhcpv4: use iface-name
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Sun, 14 Jun 2015 22:43:28 +0000 (00:43 +0200)]
dhcpv4: remove comment code lines
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Sun, 14 Jun 2015 22:39:32 +0000 (00:39 +0200)]
dhcpv4: use ubus for ipv4 dhcp range calculation
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Sun, 14 Jun 2015 22:35:50 +0000 (00:35 +0200)]
dhcpv4: add for_each ipv4-address array in ubus_get_address4 ubus_get_mask4 function
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Sun, 14 Jun 2015 20:55:50 +0000 (22:55 +0200)]
dhcpv4: add ubus_get_address4 ubus_get_mask4 function
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Patrick Grimm [Sun, 14 Jun 2015 19:43:20 +0000 (21:43 +0200)]
dhcpv4: read ipv4-address from UBUS to ADDRESS4
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
Steven Barth [Thu, 21 May 2015 14:21:59 +0000 (16:21 +0200)]
dhcpv6: fix typo
Steven Barth [Wed, 13 May 2015 12:29:51 +0000 (14:29 +0200)]
dhcpv6-pd: ignore /64 on interface
Steven Barth [Mon, 11 May 2015 19:49:13 +0000 (21:49 +0200)]
dhcpv4: remove invalid free()
Signed-off-by: Steven Barth <steven@midlink.org>
Steven Barth [Tue, 21 Apr 2015 07:42:17 +0000 (09:42 +0200)]
config: fix typo in reload_cb
Steven Barth [Mon, 20 Apr 2015 17:29:24 +0000 (19:29 +0200)]
dhcpv6: don't initialize IA-handing when turning down interface
Steven Barth [Mon, 20 Apr 2015 17:07:45 +0000 (19:07 +0200)]
remove leftover fallout from prefix class support
Steven Barth [Tue, 14 Apr 2015 14:18:01 +0000 (16:18 +0200)]
Fix logic inversion
Signed-off-by: Steven Barth <steven@midlink.org>
Steven Barth [Tue, 14 Apr 2015 08:31:10 +0000 (10:31 +0200)]
Fix potential invalid memory access
Steven Barth [Fri, 10 Apr 2015 11:52:00 +0000 (13:52 +0200)]
ra: always send current hop limit
Steven Barth [Mon, 6 Apr 2015 10:47:28 +0000 (12:47 +0200)]
dhcpv6: fix handling of infinite lifetimes
John Crispin [Sat, 28 Mar 2015 17:12:21 +0000 (18:12 +0100)]
properly handle return codes
Signed-off-by: John Crispin <blogic@openwrt.org>
Steven Barth [Mon, 30 Mar 2015 08:53:11 +0000 (10:53 +0200)]
dhcpv6: fix default assignment of non-64
Signed-off-by: Steven Barth <steven@midlink.org>
Steven Barth [Mon, 30 Mar 2015 08:45:38 +0000 (10:45 +0200)]
dhcpv6: prefer ula over other globals
Steven Barth [Mon, 30 Mar 2015 08:08:51 +0000 (10:08 +0200)]
Readd missing ubus function definitions
Steven Barth [Sun, 29 Mar 2015 13:39:20 +0000 (15:39 +0200)]
Fix hostname export
Steven Barth [Sun, 29 Mar 2015 12:37:13 +0000 (14:37 +0200)]
Remove prefix coloring support, refine hybrid management mode
Felix Fietkau [Sun, 29 Mar 2015 02:31:19 +0000 (04:31 +0200)]
odhcpd: use proper struct msghdr initializers to fix build error on musl
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Steven Barth [Mon, 2 Mar 2015 15:31:27 +0000 (16:31 +0100)]
Merge pull request #36 from fingon/compile-fix
DHCPv4: Compile fix on 64bit Debian.
Markus Stenberg [Mon, 23 Feb 2015 11:13:36 +0000 (13:13 +0200)]
DHCPv4: Compile fix on 64bit Debian.
Steven Barth [Thu, 19 Feb 2015 14:56:35 +0000 (15:56 +0100)]
Merge pull request #29 from mehlis/rework-dhcpv4_assign
dhcpv4_assign: rework the assignment logic
Steven Barth [Thu, 6 Nov 2014 13:36:19 +0000 (14:36 +0100)]
DHCPv6: enable flash-renumbering hack only for /64 prefixes
sbyx [Thu, 30 Oct 2014 13:23:35 +0000 (14:23 +0100)]
Merge pull request #30 from dedeckeh/bugfixes
Fix IPv6 DNS server adddress selection
Hans Dedecker [Thu, 30 Oct 2014 11:30:32 +0000 (12:30 +0100)]
Fix IPv6 DNS server adddress selection
Fix selection of IPv6 DNS address in DHCPv6 and RA overwrite as an address could be selected
with preferred lifetime zero while IPv6 addresses are in use with non zero preferred
lifetimes.
Fix tries to pick the IPv6 address with the longest preferred lifetime now.
Fixes also the issue an IPv6 address with preferred lifetime zero could be returned in DHCPv6
DNS server option while an IPv6 address with non zero preferred lifetime is returned as DNS
recursive RA option for the same set of available IPv6 addresses.
Christian Mehlis [Tue, 21 Oct 2014 16:30:46 +0000 (18:30 +0200)]
dhcpv4_assign: rework the assignment logic
sbyx [Tue, 21 Oct 2014 15:39:48 +0000 (17:39 +0200)]
Merge pull request #28 from mehlis/dhcpv4_assign-clarify
dhcpv4_assign: try 100 times to find a IP
Christian Mehlis [Tue, 21 Oct 2014 15:34:24 +0000 (17:34 +0200)]
dhcpv4_assign: try 100 times to find a IP
This is what the comment on the loop is saying.
Also change the srand comment to match to the actual code.
Steven Barth [Sat, 18 Oct 2014 15:46:34 +0000 (17:46 +0200)]
dhcpv6: fix calculation of T1 and T2
Steven Barth [Fri, 17 Oct 2014 11:14:47 +0000 (13:14 +0200)]
ndp: more fixes
Steven Barth [Fri, 17 Oct 2014 10:20:33 +0000 (12:20 +0200)]
ndp: fix proxying behavior
Steven Barth [Fri, 17 Oct 2014 08:04:10 +0000 (10:04 +0200)]
ndp: fix proc-setting
Steven Barth [Thu, 16 Oct 2014 15:29:19 +0000 (17:29 +0200)]
dhcpv6: allow flash renumbering in hybrid management mode
Steven Barth [Thu, 16 Oct 2014 15:19:05 +0000 (17:19 +0200)]
Begin rewrite of NDP-relay