diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-17 18:34:02 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-17 18:34:11 +0200 |
commit | 8f0c2688d79d9822157de9651fc2516c2a1379cb (patch) | |
tree | 871986b1ce051ceaa74b963ba04ff8e069f54784 /ripd | |
parent | Merge pull request #8556 from donaldsharp/bgp_pbr_weird (diff) | |
download | frr-8f0c2688d79d9822157de9651fc2516c2a1379cb.tar.xz frr-8f0c2688d79d9822157de9651fc2516c2a1379cb.zip |
ripd: fix interface wakeup after shutdown
RIP schedules a call to `rip_interface_wakeup` in 1 second after
receiving the interface UP event from zebra. The function is called even
if the interface was shut down during this interval.
This is incorrect and also leads to a crash in the following scenario:
```
vtysh -c "conf" -c "router rip vrf red" -c "network enp2s0"
ip link add red type vrf table 1
ip link set enp2s0 vrf red
ip link set enp2s0 down
ip link set enp2s0 up && ip link del red
```
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 0b927c76f..bdae2c5ef 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -493,6 +493,9 @@ int rip_if_down(struct interface *ifp) struct listnode *listnode = NULL, *nextnode = NULL; ri = ifp->info; + + THREAD_OFF(ri->t_wakeup); + rip = ri->rip; if (rip) { for (rp = route_top(rip->table); rp; rp = route_next(rp)) |