mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 20:27:14 +00:00
lib: Adjust only any
flag for prefix-list entries if destroying
Before this patch, if we destroy `any` flag for a prefix-list entry, we always set destination as 0.0.0.0/0 and/or ::/0. This means that, if we switch from `ip prefix-list r1-2 seq 5 deny any` to `ip prefix-list r1-2 seq 5 permit 10.10.10.10/32` we will have `permit any` eventually, which broke ACLs. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
a1e538178c
commit
61c07b9d43
@ -1326,6 +1326,7 @@ DEFPY_YANG(
|
||||
vty, "./ipv4-prefix-length-lesser-or-equal",
|
||||
NB_OP_DESTROY, NULL);
|
||||
}
|
||||
nb_cli_enqueue_change(vty, "./any", NB_OP_DESTROY, NULL);
|
||||
} else {
|
||||
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
|
||||
}
|
||||
|
@ -1630,7 +1630,7 @@ static int lib_prefix_list_entry_any_destroy(struct nb_cb_destroy_args *args)
|
||||
/* Start prefix entry update procedure. */
|
||||
prefix_list_entry_update_start(ple);
|
||||
|
||||
prefix_list_entry_set_empty(ple);
|
||||
ple->any = false;
|
||||
|
||||
/* Finish prefix entry update procedure. */
|
||||
prefix_list_entry_update_finish(ple);
|
||||
|
Loading…
Reference in New Issue
Block a user