]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospf6d: fix possible NULL dereference
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 15 Sep 2021 10:48:29 +0000 (13:48 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 15 Sep 2021 10:48:29 +0000 (13:48 +0300)
OSPF6_CMD_CHECK_RUNNING doesn't check that ospf6 is not NULL.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
ospf6d/ospf6_gr_helper.c

index 76496c050f58e74494374ef74ee0301f93804378..77eb9e8b3996870381149483caeb8eb8c302030b 100644 (file)
@@ -1155,7 +1155,10 @@ DEFPY(show_ipv6_ospf6_gr_helper,
        bool detail = false;
 
        ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME);
-       OSPF6_CMD_CHECK_RUNNING();
+       if (ospf6 == NULL) {
+               vty_out(vty, "OSPFv3 is not configured\n");
+               return CMD_SUCCESS;
+       }
 
        if (argv_find(argv, argc, "detail", &idx))
                detail = true;