Age | Commit message (Collapse) | Author |
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Patch by Daniel Dickinson
Signed-off-by: Steven Barth <steven@midlink.org>
|
|
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
|
|
Signed-off-by: Steven Barth <steven@midlink.org>
|
|
|
|
|
|
|
|
This is what the comment on the loop is saying.
Also change the srand comment to match to the actual code.
|
|
|
|
|
|
|
|
|
|
|
|
dhcpv4: log requests and replies to syslog
|
|
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.
|
|
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 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+--
|
|
This change let odhcpd print dhcpv4 events
to syslog.
|
|
|
|
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.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
|
|
|
|
|
|
|
|
|