Skip to content

Commit 16837f9

Browse files
jukkarandrewboie
authored andcommitted
net: if: Check in delete addr if delayed work needs cancelling
The address lifetime timer was cancelled always even if the address timer was never installed. Jira: ZEP-2397 Signed-off-by: Jukka Rissanen <[email protected]>
1 parent e06ece0 commit 16837f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

subsys/net/ip/net_if.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,9 @@ bool net_if_ipv6_addr_rm(struct net_if *iface, const struct in6_addr *addr)
668668
continue;
669669
}
670670

671-
k_delayed_work_cancel(&iface->ipv6.unicast[i].lifetime);
671+
if (!iface->ipv6.unicast[i].is_infinite) {
672+
k_delayed_work_cancel(&iface->ipv6.unicast[i].lifetime);
673+
}
672674

673675
iface->ipv6.unicast[i].is_used = false;
674676

0 commit comments

Comments
 (0)