diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-22 09:08:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-22 09:08:04 -0500 |
| commit | 57deb0c357e01cb511beacb5b83d1acad4147e97 (patch) | |
| tree | 4419c39175b473c68f7ee15e0f687923334d8a2a | |
| parent | eedb89879690a6400712864400273e1431cd6bfe (diff) | |
| parent | 188823b0809f54158b9565d8284279c0ac12683d (diff) | |
Merge pull request #3627 from manuhalo/fix_ospf_vl_del_master
ospfd: fix no virtual-link cmd
| -rw-r--r-- | ospfd/ospf_vty.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 3ab9c018ea..c1dc1f0d6f 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -1205,14 +1205,17 @@ DEFUN (no_ospf_area_vlink, return CMD_WARNING_CONFIG_FAILED; } + vl_data = ospf_vl_lookup(ospf, area, vl_config.vl_peer); + if (!vl_data) { + vty_out(vty, "Virtual link does not exist\n"); + return CMD_WARNING_CONFIG_FAILED; + } + if (argc <= 5) { /* Basic VLink no command */ /* Thats all folks! - BUGS B. strikes again!!!*/ - if ((vl_data = ospf_vl_lookup(ospf, area, vl_config.vl_peer))) - ospf_vl_delete(ospf, vl_data); - + ospf_vl_delete(ospf, vl_data); ospf_area_check_free(ospf, vl_config.area_id); - return CMD_SUCCESS; } |
