Skip to content

Commit 37b3763

Browse files
committed
fix DHCPv6 short lease time corner case
1 parent 44b42ac commit 37b3763

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

code/bngblaster/src/bbl_dhcpv6.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ void
159159
bbl_dhcpv6_s2(timer_s *timer)
160160
{
161161
bbl_session_s *session = timer->data;
162-
LOG(DHCP, "DHCPv6 (ID: %u) Lease expired\n", session->session_id);
163-
bbl_dhcpv6_restart(session);
162+
if(session->dhcpv6_state > BBL_DHCP_INIT && session->dhcpv6_state < BBL_DHCP_RELEASE) {
163+
LOG(DHCP, "DHCPv6 (ID: %u) Lease expired\n", session->session_id);
164+
bbl_dhcpv6_restart(session);
165+
}
164166
}
165167

166168
static bool

0 commit comments

Comments
 (0)