]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_dump.c
Merge pull request #1477 from chiragshah6/ospf_vrf_dev
[mirror_frr.git] / ospfd / ospf_dump.c
index 619bd4e5f529d9b7546a49b09a1072103a0d5dea..6876054a633ebc6f1d68d880df561a818cafdb48 100644 (file)
@@ -169,6 +169,7 @@ const char *ospf_timeval_dump(struct timeval *t, char *buf, size_t size)
        if (us >= 1000) {
                ms = us / 1000;
                us %= 1000;
+               (void)us; /* unused */
        }
 
        if (ms >= 1000) {
@@ -1181,7 +1182,7 @@ DEFUN (debug_ospf_zebra,
        "debug ospf zebra [<interface|redistribute>]",
        DEBUG_STR
        OSPF_STR
-       "OSPF Zebra information\n"
+       ZEBRA_STR
        "Zebra interface\n"
        "Zebra redistribute\n")
 {
@@ -1194,7 +1195,7 @@ DEFUN (debug_ospf_instance_zebra,
        DEBUG_STR
        OSPF_STR
        "Instance ID\n"
-       "OSPF Zebra information\n"
+       ZEBRA_STR
        "Zebra interface\n"
        "Zebra redistribute\n")
 {
@@ -1244,7 +1245,7 @@ DEFUN (no_debug_ospf_zebra,
        NO_STR
        DEBUG_STR
        OSPF_STR
-       "OSPF Zebra information\n"
+       ZEBRA_STR
        "Zebra interface\n"
        "Zebra redistribute\n")
 {
@@ -1258,7 +1259,7 @@ DEFUN (no_debug_ospf_instance_zebra,
        DEBUG_STR
        OSPF_STR
        "Instance ID\n"
-       "OSPF Zebra information\n"
+       ZEBRA_STR
        "Zebra interface\n"
        "Zebra redistribute\n")
 {
@@ -1604,9 +1605,10 @@ DEFUN_NOSH (show_debugging_ospf,
            DEBUG_STR
            OSPF_STR)
 {
-       struct ospf *ospf;
+       struct ospf *ospf = NULL;
 
-       if ((ospf = ospf_lookup()) == NULL)
+       ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
+       if (ospf == NULL)
                return CMD_SUCCESS;
 
        return show_debugging_ospf_common(vty, ospf);
@@ -1651,7 +1653,8 @@ static int config_write_debug(struct vty *vty)
        char str[16];
        memset(str, 0, 16);
 
-       if ((ospf = ospf_lookup()) == NULL)
+       ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
+       if (ospf == NULL)
                return CMD_SUCCESS;
 
        if (ospf->instance)