]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: don't queue interface events
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 23 Jan 2019 12:06:49 +0000 (10:06 -0200)
committerMartin Winter <mwinter@opensourcerouting.org>
Sun, 2 Jun 2019 14:49:19 +0000 (16:49 +0200)
Apply interface event as soon as possible instead of queueing an event
for it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 849576ee962518c926c6a264a497e873210941e8)

ospf6d/ospf6_interface.c

index 08922ac7bfd6b3443442b9abcd78e4fbd124603d..4916fd2e846c3af9a528d1b27320ca6d6ad97cd5 100644 (file)
@@ -381,9 +381,9 @@ void ospf6_interface_state_update(struct interface *ifp)
        if (if_is_operative(ifp)
            && (ospf6_interface_get_linklocal_address(oi->interface)
                || if_is_loopback(oi->interface)))
-               thread_add_event(master, interface_up, oi, 0, NULL);
+               thread_execute(master, interface_up, oi, 0);
        else
-               thread_add_event(master, interface_down, oi, 0, NULL);
+               thread_execute(master, interface_down, oi, 0);
 
        return;
 }
@@ -1791,8 +1791,8 @@ DEFUN (ipv6_ospf6_network,
        }
 
        /* Reset the interface */
-       thread_add_event(master, interface_down, oi, 0, NULL);
-       thread_add_event(master, interface_up, oi, 0, NULL);
+       thread_execute(master, interface_down, oi, 0);
+       thread_execute(master, interface_up, oi, 0);
 
        return CMD_SUCCESS;
 }
@@ -1825,8 +1825,8 @@ DEFUN (no_ipv6_ospf6_network,
        oi->type = type;
 
        /* Reset the interface */
-       thread_add_event(master, interface_down, oi, 0, NULL);
-       thread_add_event(master, interface_up, oi, 0, NULL);
+       thread_execute(master, interface_down, oi, 0);
+       thread_execute(master, interface_up, oi, 0);
 
        return CMD_SUCCESS;
 }
@@ -1969,8 +1969,8 @@ static void ospf6_interface_clear(struct vty *vty, struct interface *ifp)
                zlog_debug("Interface %s: clear by reset", ifp->name);
 
        /* Reset the interface */
-       thread_add_event(master, interface_down, oi, 0, NULL);
-       thread_add_event(master, interface_up, oi, 0, NULL);
+       thread_execute(master, interface_down, oi, 0);
+       thread_execute(master, interface_up, oi, 0);
 }
 
 /* Clear interface */