diff options
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 26829b3a35..5ed5abf032 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1639,6 +1639,35 @@ int pim_ifp_up(struct interface *ifp) int pim_ifp_down(struct interface *ifp) { + if (PIM_DEBUG_ZEBRA) { + zlog_debug( + "%s: %s index %d(%u) flags %ld metric %d mtu %d operative %d", + __PRETTY_FUNCTION__, ifp->name, ifp->ifindex, + ifp->vrf_id, (long)ifp->flags, ifp->metric, ifp->mtu, + if_is_operative(ifp)); + } + + if (!if_is_operative(ifp)) { + pim_ifchannel_delete_all(ifp); + /* + pim_if_addr_del_all() suffices for shutting down IGMP, + but not for shutting down PIM + */ + pim_if_addr_del_all(ifp); + + /* + pim_sock_delete() closes the socket, stops read and timer + threads, + and kills all neighbors. + */ + if (ifp->info) { + pim_sock_delete(ifp, "link down"); + } + } + + if (ifp->info) + pim_if_del_vif(ifp); + return 0; } |
