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 <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
e06ece049b
commit
16837f954f
1 changed files with 3 additions and 1 deletions
|
@ -668,7 +668,9 @@ bool net_if_ipv6_addr_rm(struct net_if *iface, const struct in6_addr *addr)
|
|||
continue;
|
||||
}
|
||||
|
||||
k_delayed_work_cancel(&iface->ipv6.unicast[i].lifetime);
|
||||
if (!iface->ipv6.unicast[i].is_infinite) {
|
||||
k_delayed_work_cancel(&iface->ipv6.unicast[i].lifetime);
|
||||
}
|
||||
|
||||
iface->ipv6.unicast[i].is_used = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue