diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-13 13:37:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-13 13:37:03 -0400 |
| commit | aadbfa491889f90ffbadefc34d76e72a67d03578 (patch) | |
| tree | d78df6cb56ba8ab7eaa2465451e5d9340002c8ad | |
| parent | 4cf61725aa55b0411ada0a5e640dba86463a5d25 (diff) | |
| parent | e4129293c77c0de4efa1d24350db784d3f5a582b (diff) | |
Merge pull request #7294 from idryzhov/fix-no-ip-ospf-area
ospfd: fix "no ip ospf area"
| -rw-r--r-- | ospfd/ospf_vty.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 1a9ad69ed3..ba46d1dcb0 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -8232,7 +8232,7 @@ DEFUN (no_ip_ospf_area, else ospf = ospf_lookup_instance(instance); - if (ospf == NULL) + if (instance && ospf == NULL) return CMD_NOT_MY_INSTANCE; argv_find(argv, argc, "area", &idx); @@ -8262,8 +8262,11 @@ DEFUN (no_ip_ospf_area, ospf_if_update_params((ifp), (addr)); } - ospf_interface_area_unset(ospf, ifp); - ospf->if_ospf_cli_count--; + if (ospf) { + ospf_interface_area_unset(ospf, ifp); + ospf->if_ospf_cli_count--; + } + return CMD_SUCCESS; } |
