mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-10-18 19:41:08 +00:00
Merge pull request #7310 from idryzhov/fix-no-bgp-as-path
bgpd: print error when as-path filter doesn't exist
This commit is contained in:
commit
974c396af3
@ -507,14 +507,16 @@ DEFUN(no_as_path, no_bgp_as_path_cmd,
|
||||
/* Lookup asfilter. */
|
||||
asfilter = as_filter_lookup(aslist, regstr, type);
|
||||
|
||||
XFREE(MTYPE_TMP, regstr);
|
||||
bgp_regex_free(regex);
|
||||
|
||||
if (asfilter == NULL) {
|
||||
vty_out(vty, "\n");
|
||||
vty_out(vty, "Regex entered %s does not exist\n", regstr);
|
||||
XFREE(MTYPE_TMP, regstr);
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
|
||||
XFREE(MTYPE_TMP, regstr);
|
||||
|
||||
as_list_filter_delete(aslist, asfilter);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user