diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-01-26 16:04:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-26 16:04:24 -0500 |
| commit | 504bb0373607006fe988d8e8ef657881e340cb7b (patch) | |
| tree | d8cdf10945cadc054b6cd08b1ea5212b3fc4fcde /ospf6d/ospf6_interface.c | |
| parent | b2fd215b211f960eb9ba0ad7c06ca29f269bd8fd (diff) | |
| parent | 9ae41e310539d032582ae3101f800cb56877253d (diff) | |
Merge pull request #7935 from donaldsharp/ospf6_use_after_free
ospf6d: Track wait_timer and disable when needed
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 4988cee7d8..948880a4b5 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -250,6 +250,7 @@ void ospf6_interface_delete(struct ospf6_interface *oi) THREAD_OFF(oi->thread_send_lsupdate); THREAD_OFF(oi->thread_send_lsack); THREAD_OFF(oi->thread_sso); + THREAD_OFF(oi->thread_wait_timer); ospf6_lsdb_remove_all(oi->lsdb); ospf6_lsdb_remove_all(oi->lsupdate_list); @@ -304,6 +305,7 @@ void ospf6_interface_disable(struct ospf6_interface *oi) THREAD_OFF(oi->thread_link_lsa); THREAD_OFF(oi->thread_intra_prefix_lsa); THREAD_OFF(oi->thread_as_extern_lsa); + THREAD_OFF(oi->thread_wait_timer); } static struct in6_addr * @@ -793,7 +795,7 @@ int interface_up(struct thread *thread) else { ospf6_interface_state_change(OSPF6_INTERFACE_WAITING, oi); thread_add_timer(master, wait_timer, oi, oi->dead_interval, - NULL); + &oi->thread_wait_timer); } return 0; |
