project/odhcpd.git
7 years agodhcpv6-ia: update valid_until only for non static DHCPv6 leases
Hans Dedecker [Mon, 2 Jan 2017 16:10:14 +0000 (17:10 +0100)]
dhcpv6-ia: update valid_until only for non static DHCPv6 leases

Update valid_until lifetime only for non static DHCPv6 leases otherwise
the lifetime of a static lease is not infinite anymore

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv4: coding style fixes
Hans Dedecker [Mon, 2 Jan 2017 15:29:14 +0000 (16:29 +0100)]
dhcpv4: coding style fixes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoREADME: Add host leasetime uci parameter
Hans Dedecker [Sat, 31 Dec 2016 09:26:49 +0000 (10:26 +0100)]
README: Add host leasetime uci parameter

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia: fix invalid IPv6/hostname entries in statefile
Hans Dedecker [Fri, 30 Dec 2016 19:52:05 +0000 (20:52 +0100)]
dhcpv6-ia: fix invalid IPv6/hostname entries in statefile

Statefull IPv6 addresses are assigned to DHCPv6 clients from a
local prefix based on criteria which need to be fulfilled.
One of those criteria requires the IPv6 address still having
preferred lifetime which was not checked when constructing
the contents of the statefile.
Another criteria requires the prefix length not being smaller
than or equal to 64 when ra_management equals 0 or 1 which was
neither correctly checked when constructing the statefile.
This can lead to invalid hostname/IPv6 entries in the statefile
and thus possible connectivity issues when using DNS resolving.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia: fix delete logic of an assignment in reconf_timer
Hans Dedecker [Fri, 30 Dec 2016 16:44:44 +0000 (17:44 +0100)]
dhcpv6-ia: fix delete logic of an assignment in reconf_timer

Function free_dhcpv6_assignment already removes the assignment in
the list so there's no need to call list_del in reconf_timer

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia : code style fixes
Hans Dedecker [Fri, 30 Dec 2016 16:34:01 +0000 (17:34 +0100)]
dhcpv6-ia : code style fixes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoconfig: use free_lease to delete a lease
Hans Dedecker [Thu, 29 Dec 2016 14:17:13 +0000 (15:17 +0100)]
config: use free_lease to delete a lease

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoconfig: coding style fixes
Hans Dedecker [Thu, 29 Dec 2016 13:12:08 +0000 (14:12 +0100)]
config: coding style fixes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoconfig: Create statefile dir
Hans Dedecker [Thu, 29 Dec 2016 11:33:39 +0000 (12:33 +0100)]
config: Create statefile dir

Create statefile dir if the specified dir does not yet exist

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia: use free_dhcpv6_assignment where needed
Hans Dedecker [Wed, 28 Dec 2016 22:23:55 +0000 (23:23 +0100)]
dhcpv6-ia: use free_dhcpv6_assignment where needed

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia: make free_dhcpv6_assignment static
Hans Dedecker [Wed, 28 Dec 2016 22:18:54 +0000 (23:18 +0100)]
dhcpv6-ia: make free_dhcpv6_assignment static

Further align coding style

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv4: make dhcpv4_msg_to_string static
Hans Dedecker [Wed, 28 Dec 2016 22:07:47 +0000 (23:07 +0100)]
dhcpv4: make dhcpv4_msg_to_string static

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv4: fix DHCPv4 hostname handling
Hans Dedecker [Wed, 28 Dec 2016 09:57:30 +0000 (10:57 +0100)]
dhcpv4: fix DHCPv4 hostname handling

Fix hostname not being reported as "-" in the DHCP statefile in case
no hostname is reported by the DHCPv4 client
(https://:wqgithub.com/openwrt/odhcpd/issues/94)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoLimit lifetime of non-static leases in case of release and decline
Hans Dedecker [Thu, 15 Dec 2016 21:37:47 +0000 (22:37 +0100)]
Limit lifetime of non-static leases in case of release and decline

In case infinite leasetime is assigned to a non static DHCPv4/v6 lease
override the infinite lifetime of the lease when either a DHCPv4/v6
decline or release is received.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoRevert "Respect interface "ignore" settings as documented."
Stijn Tintel [Tue, 27 Dec 2016 08:40:21 +0000 (09:40 +0100)]
Revert "Respect interface "ignore" settings as documented."

This reverts commit 5f425ed1e5f92397e27ec4f44820b6ef677b8134.

Both dnsmasq and odhcpd use the ignore option. This is fine for normal
operation, but it breaks DHCPv6 relay when dnsmasq is disabled on the
wan interface.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agorouter: skip parse_routes when ra_default > 1
Stijn Tintel [Sun, 14 Aug 2016 17:22:57 +0000 (20:22 +0300)]
router: skip parse_routes when ra_default > 1

It does not make sense to scan the entire routing table if the decision
will be overridden afterwards.

This makes it possible to use odhcpd on a router with full IPv6 BGP
table, by setting ra_default to 2. Without this change, odhcpd is
constantly busy reading /proc/net/ipv6_route, and doesn't respond to
router solicitations in time.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years agoDon't print non bound assignments in the state file
Hans Dedecker [Wed, 14 Dec 2016 21:22:22 +0000 (22:22 +0100)]
Don't print non bound assignments in the state file

Set bound flag for DHCPv4 and DHCPv6 assignments when the IPv6/IPv4 address
is leased to a client.
This will prevent the printing of leases and hostname/IPv4/IPv6 address
combinations in the state file for for which the IPv4/6 address has not
been assigned.
Also this will fix the printing of assignments which have been declined
by the clients

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agoconfig: Fix RA interface config being overwritten
Hans Dedecker [Mon, 5 Dec 2016 08:57:12 +0000 (09:57 +0100)]
config: Fix RA interface config being overwritten

In case multiple dhcp uci sections are configured and one section contains
RA config while the other section does not; the RA interface config of the
first section will be overwritten by the second section.
Fix this by setting the default values for ra_management and ndp_proxy_routing
uci parameters when the interface is created and by removing the overwrite check

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia : Fix static DHCPv6 assignments becoming non static
Hans Dedecker [Thu, 1 Dec 2016 13:24:24 +0000 (14:24 +0100)]
dhcpv6-ia : Fix static DHCPv6 assignments becoming non static

The valid_until parameter which is set to 0 for static DHCPv6
assignments was overwritten depending on the received DHCPv6 message
which turned the assignment into having a finite lifetime and thus not
static anymore.
Fix this by checking if the valid_until parameter holds infinite
lifetime before updating it.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agodhcpv6-ia: Fix assignment of static DHCPv6 leases
Hans Dedecker [Thu, 1 Dec 2016 13:24:23 +0000 (14:24 +0100)]
dhcpv6-ia: Fix assignment of static DHCPv6 leases

Fix assignment of static DHCPv6 leases which was broken
by commit 6c3bc0141dacc88992583d6f2cdc8a360df7422d.
At the same time fix lifetime check of existing assignments
having a finite lifetime

Fixes FS#309

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
7 years agocmake: Find libubox/uloop.h
Florian Fainelli [Sat, 2 Jul 2016 00:05:17 +0000 (17:05 -0700)]
cmake: Find libubox/uloop.h

Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/uloop.h. Some external toolchains which do not include standard
locations would fail to find the header otherwise.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoodhcpd: Display infinite valid lifetime as -1
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>
7 years agoRespect interface "ignore" settings as documented.
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>
7 years agoenable loglevel setting via command line
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>
7 years agodhcpv4: Adding DHCP client leasetime request support
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>
7 years agodhcpv6-ia: Display infinite lifetime as INT32_MAX in state file
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>
7 years agoubus: Fix displayed valid paramater for both DHCPv4 and DHCPv6 lease
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>
7 years agodhcpv4: Keep DHCPv4 assignment lifetime value in sync with assigned leasetime
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>
7 years agoconfig: Support infinite as DHCP pool leasetime value
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>
8 years agoCorrect a typo
Massimiliano Stucchi [Wed, 22 Jun 2016 08:22:41 +0000 (10:22 +0200)]
Correct a typo

8 years agoodhcpd: remove superfluous log output.
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>
8 years agoAdd per-host leasetime support
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>
8 years agoMerge pull request #68 from dedeckeh/bugfixes
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

8 years agoconfig: 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>
8 years agoMerge pull request #67 from dedeckeh/bugfixes
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

8 years agoconfig: Prioritize ifname resolving via ubus over ifname/networkid attributes
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>
8 years agoconfig: Close interface when ifindex cannot be resolved
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>
8 years agofall through in error case to clear congestion
Steven Barth [Tue, 17 Nov 2015 07:44:07 +0000 (08:44 +0100)]
fall through in error case to clear congestion

8 years agoHandle netlink ENOBUFS events
Steven Barth [Mon, 16 Nov 2015 11:10:24 +0000 (12:10 +0100)]
Handle netlink ENOBUFS events

9 years agoMerge pull request #63 from willmo/router-lifetime
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

9 years agoDon't overflow router lifetime
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.

9 years agoMerge pull request #62 from willmo/dns-lifetime
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

9 years agoCorrectly byteswap DNS lifetimes in RAs
Will Mortensen [Mon, 19 Oct 2015 03:59:20 +0000 (20:59 -0700)]
Correctly byteswap DNS lifetimes in RAs

9 years agodhcpv6: use correct length when copying duid
Steven Barth [Mon, 7 Sep 2015 13:28:10 +0000 (15:28 +0200)]
dhcpv6: use correct length when copying duid

9 years agorouter: don't announce as default router if we aren't
Steven Barth [Mon, 7 Sep 2015 09:48:05 +0000 (11:48 +0200)]
router: don't announce as default router if we aren't

9 years agorouter: reduce dns lifetime to 10x maximum interval
Steven Barth [Mon, 7 Sep 2015 09:39:19 +0000 (11:39 +0200)]
router: reduce dns lifetime to 10x maximum interval

9 years agodhcpv6: fix mac-handling
Steven Barth [Mon, 7 Sep 2015 09:21:58 +0000 (11:21 +0200)]
dhcpv6: fix mac-handling

9 years agoFixup RAs/DHCPv6 announcing incorrect addresses
Steven Barth [Tue, 1 Sep 2015 13:29:31 +0000 (15:29 +0200)]
Fixup RAs/DHCPv6 announcing incorrect addresses

9 years agorouter/dhcpv6: use link-local addresses for DNS
Steven Barth [Thu, 20 Aug 2015 09:33:23 +0000 (11:33 +0200)]
router/dhcpv6: use link-local addresses for DNS

9 years agorouter: improve deprecation handling
Steven Barth [Thu, 20 Aug 2015 08:45:31 +0000 (10:45 +0200)]
router: improve deprecation handling

9 years agoMerge pull request #56 from sbyx/revert-46-master
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"

9 years agoRevert "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"

9 years agoMerge pull request #54 from dedeckeh/bugfixes
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

9 years agoMerge pull request #46 from stargieg/master
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

9 years agorouter: Fix infinite lifetimes
Hans Dedecker [Mon, 10 Aug 2015 16:31:46 +0000 (18:31 +0200)]
router: Fix infinite lifetimes

9 years agorouter: Fix compile issues
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

9 years agora/dhcpv6: unify address change handling
Steven Barth [Mon, 27 Jul 2015 21:21:57 +0000 (23:21 +0200)]
ra/dhcpv6: unify address change handling

9 years agoFix RA lifetimes
Steven Barth [Fri, 24 Jul 2015 13:46:55 +0000 (15:46 +0200)]
Fix RA lifetimes

9 years agodhcpv6: fix socket generation on relay master
Steven Barth [Fri, 17 Jul 2015 11:06:19 +0000 (13:06 +0200)]
dhcpv6: fix socket generation on relay master

9 years agodhcpv6: send relay-forward messages using correct socket
Steven Barth [Fri, 17 Jul 2015 08:46:07 +0000 (10:46 +0200)]
dhcpv6: send relay-forward messages using correct socket

9 years agorouter: unify RA router and DNS lifetime
Steven Barth [Wed, 15 Jul 2015 07:37:52 +0000 (09:37 +0200)]
router: unify RA router and DNS lifetime

9 years agorouter: fixup RA lifetime calculation
Steven Barth [Wed, 15 Jul 2015 06:56:53 +0000 (08:56 +0200)]
router: fixup RA lifetime calculation

9 years agorouter: fix invalid router lifetime
Steven Barth [Tue, 14 Jul 2015 19:49:57 +0000 (21:49 +0200)]
router: fix invalid router lifetime

9 years agorouter: fix logic inversion
Steven Barth [Tue, 14 Jul 2015 19:44:08 +0000 (21:44 +0200)]
router: fix logic inversion

9 years agondp: reintroduce address replay
Steven Barth [Tue, 14 Jul 2015 18:49:02 +0000 (20:49 +0200)]
ndp: reintroduce address replay

9 years agoRemove unsolicited unicast RAs, adjust intervals
Steven Barth [Tue, 14 Jul 2015 15:56:38 +0000 (17:56 +0200)]
Remove unsolicited unicast RAs, adjust intervals

9 years agondp: fixup relay
Steven Barth [Tue, 14 Jul 2015 09:05:31 +0000 (11:05 +0200)]
ndp: fixup relay

9 years agondp: remove bindtodevice workaround
Steven Barth [Mon, 13 Jul 2015 21:08:19 +0000 (23:08 +0200)]
ndp: remove bindtodevice workaround

9 years agoodhcpd: remove old workaround
Steven Barth [Mon, 13 Jul 2015 21:01:19 +0000 (23:01 +0200)]
odhcpd: remove old workaround

9 years agondp: fixup route replication
Steven Barth [Mon, 13 Jul 2015 20:46:25 +0000 (22:46 +0200)]
ndp: fixup route replication

9 years agorouter: only send RAs to neighbors if unsolicited
Steven Barth [Mon, 13 Jul 2015 20:14:07 +0000 (22:14 +0200)]
router: only send RAs to neighbors if unsolicited

9 years agorouter: only send direct RAs to link-local addresses
Steven Barth [Mon, 13 Jul 2015 20:08:17 +0000 (22:08 +0200)]
router: only send direct RAs to link-local addresses

9 years agomain: fix missing parameter while iterating neighbors
Steven Barth [Tue, 7 Jul 2015 14:04:05 +0000 (16:04 +0200)]
main: fix missing parameter while iterating neighbors

9 years agorouter: also send RAs to every known neighbor
Steven Barth [Tue, 7 Jul 2015 14:01:13 +0000 (16:01 +0200)]
router: also send RAs to every known neighbor

9 years agondp: replay on-link routes instead of address assignments
Steven Barth [Tue, 7 Jul 2015 13:42:55 +0000 (15:42 +0200)]
ndp: replay on-link routes instead of address assignments

9 years agora: keep alive neighbor entries so we can send unicast RAs in the future
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

9 years agodhcpv4: remove unused addr_attrs struct
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>
9 years agodhcpv4: add ifdef ubus for dhcp4 ip
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>
9 years agodhcpv4: add in_addr dhcpv4_mask and in_addr dhcpv4_addr to struct interface
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>
9 years agodhcpv4: fix unitialization of mask
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>
9 years agodhcpv4: fix char ubus_get_address4 int ubus_get_mask4 function
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>
9 years agodhcpv4: add ubus_get_address4 ubus_get_mask4 function
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>
9 years agodhcpv4: return pointer
Patrick Grimm [Mon, 15 Jun 2015 01:38:09 +0000 (03:38 +0200)]
dhcpv4: return pointer

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
9 years agodhcpv4: use iface-name
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>
9 years agodhcpv4: remove comment code lines
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>
9 years agodhcpv4: use ubus for ipv4 dhcp range calculation
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>
9 years agodhcpv4: add for_each ipv4-address array in ubus_get_address4 ubus_get_mask4 function
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>
9 years agodhcpv4: add ubus_get_address4 ubus_get_mask4 function
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>
9 years agodhcpv4: read ipv4-address from UBUS to ADDRESS4
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>
9 years agodhcpv6: fix typo
Steven Barth [Thu, 21 May 2015 14:21:59 +0000 (16:21 +0200)]
dhcpv6: fix typo

9 years agodhcpv6-pd: ignore /64 on interface
Steven Barth [Wed, 13 May 2015 12:29:51 +0000 (14:29 +0200)]
dhcpv6-pd: ignore /64 on interface

9 years agodhcpv4: remove invalid free()
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>
9 years agoconfig: fix typo in reload_cb
Steven Barth [Tue, 21 Apr 2015 07:42:17 +0000 (09:42 +0200)]
config: fix typo in reload_cb

9 years agodhcpv6: don't initialize IA-handing when turning down interface
Steven Barth [Mon, 20 Apr 2015 17:29:24 +0000 (19:29 +0200)]
dhcpv6: don't initialize IA-handing when turning down interface

9 years agoremove leftover fallout from prefix class support
Steven Barth [Mon, 20 Apr 2015 17:07:45 +0000 (19:07 +0200)]
remove leftover fallout from prefix class support

9 years agoFix logic inversion
Steven Barth [Tue, 14 Apr 2015 14:18:01 +0000 (16:18 +0200)]
Fix logic inversion

Signed-off-by: Steven Barth <steven@midlink.org>
9 years agoFix potential invalid memory access
Steven Barth [Tue, 14 Apr 2015 08:31:10 +0000 (10:31 +0200)]
Fix potential invalid memory access

9 years agora: always send current hop limit
Steven Barth [Fri, 10 Apr 2015 11:52:00 +0000 (13:52 +0200)]
ra: always send current hop limit

9 years agodhcpv6: fix handling of infinite lifetimes
Steven Barth [Mon, 6 Apr 2015 10:47:28 +0000 (12:47 +0200)]
dhcpv6: fix handling of infinite lifetimes

9 years agoproperly handle return codes
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>