diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-15 13:48:29 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-09-15 13:48:29 +0300 |
| commit | 390dce127525f4529cd239af91b8e68c6965b56a (patch) | |
| tree | 81a477e3b5e8a1cb86d1abd3dd2372ebcb970003 /ospf6d/ospf6_gr_helper.c | |
| parent | 9948e5acb2a6ffb8ea092ecab5f5777025c5dc41 (diff) | |
ospf6d: fix possible NULL dereference
OSPF6_CMD_CHECK_RUNNING doesn't check that ospf6 is not NULL.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospf6d/ospf6_gr_helper.c')
| -rw-r--r-- | ospf6d/ospf6_gr_helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |
