From: Igor Ryzhov Date: Wed, 15 Sep 2021 10:48:29 +0000 (+0300) Subject: ospf6d: fix possible NULL dereference X-Git-Tag: base_8.1~61^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=390dce127525f4529cd239af91b8e68c6965b56a;p=matthieu%2Ffrr.git ospf6d: fix possible NULL dereference OSPF6_CMD_CHECK_RUNNING doesn't check that ospf6 is not NULL. Signed-off-by: Igor Ryzhov --- diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c index 76496c050f..77eb9e8b39 100644 --- a/ospf6d/ospf6_gr_helper.c +++ b/ospf6d/ospf6_gr_helper.c @@ -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;