summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_bfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_bfd.c')
-rw-r--r--ospf6d/ospf6_bfd.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c
index f9bb6f0031..fed5021208 100644
--- a/ospf6d/ospf6_bfd.c
+++ b/ospf6d/ospf6_bfd.c
@@ -245,7 +245,7 @@ ospf6_bfd_interface_dest_update (int command, struct zclient *zclient,
old_status = bfd_info->status;
bfd_info->status = status;
- quagga_gettime (QUAGGA_CLK_MONOTONIC, &tv);
+ monotime(&tv);
bfd_info->last_update = tv.tv_sec;
if ((status == BFD_STATUS_DOWN) && (old_status == BFD_STATUS_UP))
@@ -328,10 +328,8 @@ DEFUN (ipv6_ospf6_bfd,
"Enables BFD support\n"
)
{
+ VTY_DECLVAR_CONTEXT(interface, ifp);
struct ospf6_interface *oi;
- struct interface *ifp;
-
- ifp = (struct interface *) vty->index;
assert (ifp);
oi = (struct ospf6_interface *) ifp->info;
@@ -346,7 +344,7 @@ DEFUN (ipv6_ospf6_bfd,
DEFUN (ipv6_ospf6_bfd_param,
ipv6_ospf6_bfd_param_cmd,
- "ipv6 ospf6 bfd " BFD_CMD_DETECT_MULT_RANGE BFD_CMD_MIN_RX_RANGE BFD_CMD_MIN_TX_RANGE,
+ "ipv6 ospf6 bfd (2-255) (50-60000) (50-60000)",
IP6_STR
OSPF6_STR
"Enables BFD support\n"
@@ -354,14 +352,16 @@ DEFUN (ipv6_ospf6_bfd_param,
"Required min receive interval\n"
"Desired min transmit interval\n")
{
+ VTY_DECLVAR_CONTEXT(interface, ifp);
+ int idx_number = 3;
+ int idx_number_2 = 4;
+ int idx_number_3 = 5;
struct ospf6_interface *oi;
- struct interface *ifp;
u_int32_t rx_val;
u_int32_t tx_val;
u_int8_t dm_val;
int ret;
- ifp = (struct interface *) vty->index;
assert (ifp);
oi = (struct ospf6_interface *) ifp->info;
@@ -369,7 +369,7 @@ DEFUN (ipv6_ospf6_bfd_param,
oi = ospf6_interface_create (ifp);
assert (oi);
- if ((ret = bfd_validate_param (vty, argv[0], argv[1], argv[2], &dm_val,
+ if ((ret = bfd_validate_param (vty, argv[idx_number]->arg, argv[idx_number_2]->arg, argv[idx_number_3]->arg, &dm_val,
&rx_val, &tx_val)) != CMD_SUCCESS)
return ret;
@@ -387,10 +387,8 @@ DEFUN (no_ipv6_ospf6_bfd,
"Disables BFD support\n"
)
{
+ VTY_DECLVAR_CONTEXT(interface, ifp);
struct ospf6_interface *oi;
- struct interface *ifp;
-
- ifp = (struct interface *) vty->index;
assert (ifp);
oi = (struct ospf6_interface *) ifp->info;