Merge pull request #11662 from opensourcerouting/fix/call_hooks_when_replacing_asfilter

bgpd: Call a hook when as-path filter is replaced
This commit is contained in:
Donald Sharp 2022-07-22 09:48:25 -04:00 committed by GitHub
commit efb6140a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,7 +189,7 @@ static void as_list_filter_add(struct as_list *aslist,
replace = bgp_aslist_seq_check(aslist, asfilter->seq);
if (replace) {
as_filter_entry_replace(aslist, replace, asfilter);
return;
goto hook;
}
/* Check insert point. */
@ -218,6 +218,7 @@ static void as_list_filter_add(struct as_list *aslist,
aslist->tail = asfilter;
}
hook:
/* Run hook function. */
if (as_list_master.add_hook)
(*as_list_master.add_hook)(aslist->name);