struct interface *ifp = oi->interface;
struct bfd_info *bfd_info;
char src[64];
+ int cbit;
if (!oi->bfd_info || !on->bfd_info)
return;
bfd_get_command_dbg_str(command), src);
}
+ cbit = CHECK_FLAG(bfd_info->flags, BFD_FLAG_BFD_CBIT_ON);
+
bfd_peer_sendmsg(zclient, bfd_info, AF_INET6, &on->linklocal_addr,
- on->ospf6_if->linklocal_addr, ifp->name, 0, 0, command,
- 0, VRF_DEFAULT);
+ on->ospf6_if->linklocal_addr, ifp->name, 0, 0,
+ cbit, command, 0, VRF_DEFAULT);
if (command == ZEBRA_BFD_DEST_DEREGISTER)
bfd_info_free((struct bfd_info **)&on->bfd_info);
* ospf6_bfd_nbr_replay - Replay all the neighbors that have BFD enabled
* to zebra
*/
-static int ospf6_bfd_nbr_replay(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int ospf6_bfd_nbr_replay(ZAPI_CALLBACK_ARGS)
{
- struct listnode *inode, *nnode;
+ struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
+ struct listnode *node;
struct interface *ifp;
struct ospf6_interface *oi;
struct ospf6_neighbor *on;
zlog_debug("Zebra: BFD Dest replay request");
/* Send the client registration */
- bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER);
+ bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, vrf_id);
/* Replay the neighbor, if BFD is enabled on the interface*/
- for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), inode, ifp)) {
+ FOR_ALL_INTERFACES (vrf, ifp) {
oi = (struct ospf6_interface *)ifp->info;
if (!oi || !oi->bfd_info)
continue;
- for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, nnode, on)) {
+ for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, node, on)) {
if (on->state < OSPF6_NEIGHBOR_TWOWAY)
continue;
* has changed and bring down the neighbor
* connectivity if BFD down is received.
*/
-static int ospf6_bfd_interface_dest_update(int command, struct zclient *zclient,
- zebra_size_t length, vrf_id_t vrf_id)
+static int ospf6_bfd_interface_dest_update(ZAPI_CALLBACK_ARGS)
{
struct interface *ifp;
struct ospf6_interface *oi;
struct bfd_info *bfd_info;
struct timeval tv;
- ifp = bfd_get_peer_info(zclient->ibuf, &dp, &sp, &status, vrf_id);
+ ifp = bfd_get_peer_info(zclient->ibuf, &dp, &sp, &status,
+ NULL, vrf_id);
if ((ifp == NULL) || (dp.family != AF_INET6))
return 0;
*/
void ospf6_bfd_write_config(struct vty *vty, struct ospf6_interface *oi)
{
+#if HAVE_BFDD == 0
struct bfd_info *bfd_info;
+#endif /* ! HAVE_BFDD */
if (!oi->bfd_info)
return;
+#if HAVE_BFDD == 0
bfd_info = (struct bfd_info *)oi->bfd_info;
if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG))
bfd_info->detect_mult, bfd_info->required_min_rx,
bfd_info->desired_min_tx);
else
+#endif /* ! HAVE_BFDD */
vty_out(vty, " ipv6 ospf6 bfd\n");
}
* ospf6_bfd_if_param_set - Set the configured BFD paramter values for
* interface.
*/
-static void ospf6_bfd_if_param_set(struct ospf6_interface *oi, u_int32_t min_rx,
- u_int32_t min_tx, u_int8_t detect_mult,
+static void ospf6_bfd_if_param_set(struct ospf6_interface *oi, uint32_t min_rx,
+ uint32_t min_tx, uint8_t detect_mult,
int defaults)
{
int command = 0;
return CMD_SUCCESS;
}
-DEFUN (ipv6_ospf6_bfd_param,
+#if HAVE_BFDD > 0
+DEFUN_HIDDEN(
+#else
+DEFUN(
+#endif /* HAVE_BFDD */
+ ipv6_ospf6_bfd_param,
ipv6_ospf6_bfd_param_cmd,
"ipv6 ospf6 bfd (2-255) (50-60000) (50-60000)",
IP6_STR
int idx_number_2 = 4;
int idx_number_3 = 5;
struct ospf6_interface *oi;
- u_int32_t rx_val;
- u_int32_t tx_val;
- u_int8_t dm_val;
+ uint32_t rx_val;
+ uint32_t tx_val;
+ uint8_t dm_val;
int ret;
assert(ifp);