mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-13 17:00:49 +00:00
Allow --dhcp-authoritative to control recreation of missing leases in DHCPv6.
Change the behaviour of the DHVPv6 server when a REBIND message is received but no lease exists. Under these circumstances a new lease is created _only_ when the --dhcp-authoritative option is set. This matches the behavior of the DHCPv4 server.
This commit is contained in:
3 files changed
+12
-3
No files matched your search
+4
-2
@@ -982,8 +982,10 @@ static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbu
|
||||
{
|
||||
if (msg_type == DHCP6REBIND)
|
||||
{
|
||||
/* When rebinding, we can create a lease if it doesn't exist. */
|
||||
lease = lease6_allocate(&req_addr, state->ia_type == OPTION6_IA_NA ? LEASE_NA : LEASE_TA);
|
||||
/* When rebinding, we can create a lease if it doesn't exist, as long
|
||||
as --dhcp-authoritative is set. */
|
||||
if (option_bool(OPT_AUTHORITATIVE))
|
||||
lease = lease6_allocate(&req_addr, state->ia_type == OPTION6_IA_NA ? LEASE_NA : LEASE_TA);
|
||||
if (lease)
|
||||
lease_set_iaid(lease, state->iaid);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user