From 7f342629a9eae034138fd542734fe2e6eca8085d Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 22 Jul 2015 12:35:37 -0700 Subject: This patch changes ospfd from only listening mode for BFD status updates to interactive mode of dynamically registering/deregistering neighbors discovered on BFD enabled interfaces with PTM/BFD through zebra. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). interface ip ospf bfd This patch also adds BFD support for IPv6 OSPF. ospf6d will dynamically register/deregister IPv6 neighbors with BFD for monitoring the connectivity of the neighbor. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF6 BFD command added to configure BFD and parameters (detect multiplier, min rx and min tx). interface ipv6 ospf6 bfd Signed-off-by: Radhika Mahankali Reviewed-by: Donald Sharp Reviewed-by: Kanna Rajagopal --- ospfd/ospf_zebra.c | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'ospfd/ospf_zebra.c') diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 38a4228ce..58e55564f 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -327,52 +327,6 @@ ospf_interface_address_delete (int command, struct zclient *zclient, return 0; } -static int -ospf_interface_bfd_dest_down (int command, struct zclient *zclient, - zebra_size_t length) -{ - struct interface *ifp; - struct ospf_interface *oi; - struct ospf_if_params *params; - struct ospf_neighbor *nbr; - struct route_node *node; - struct prefix p; - - ifp = zebra_interface_bfd_read (zclient->ibuf, &p, NULL); - - if (ifp == NULL) - return 0; - - if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) - { - char buf[128]; - prefix2str(&p, buf, sizeof(buf)); - zlog_debug("Zebra: interface %s bfd destination %s down", ifp->name, buf); - } - - params = IF_DEF_PARAMS (ifp); - if (!OSPF_IF_PARAM_CONFIGURED (params, bfd)) - return 0; - - for (node = route_top (IF_OIFS (ifp)); node; node = route_next (node)) - { - if ((oi = node->info) == NULL) - continue; - - nbr = ospf_nbr_lookup_by_addr (oi->nbrs, &p.u.prefix4); - if (!nbr) - continue; - - if (IS_DEBUG_OSPF (nsm, NSM_EVENTS)) - zlog_debug ("NSM[%s:%s]: BFD Down", - IF_NAME (nbr->oi), inet_ntoa (nbr->address.u.prefix4)); - - OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_InactivityTimer); - } - - return 0; -} - void ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or) { @@ -1590,7 +1544,6 @@ ospf_zebra_init (u_short instance) zclient->interface_down = ospf_interface_state_down; zclient->interface_address_add = ospf_interface_address_add; zclient->interface_address_delete = ospf_interface_address_delete; - zclient->interface_bfd_dest_down = ospf_interface_bfd_dest_down; zclient->ipv4_route_add = ospf_zebra_read_ipv4; zclient->ipv4_route_delete = ospf_zebra_read_ipv4; -- cgit v1.2.3