]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Adjust only `any` flag for prefix-list entries if destroying 13034/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 17 Mar 2023 12:48:35 +0000 (14:48 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 18 Mar 2023 11:31:54 +0000 (11:31 +0000)
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>
(cherry picked from commit 61c07b9d43529f69f48ca54f4f0213cff52b5d0a)

lib/filter_cli.c
lib/filter_nb.c

index 9a877a57041d8778ac0b6ad1ad7fd53cb8b68385..5c31757c2fe496f34dffb7fa726853de24f77b9e 100644 (file)
@@ -1319,6 +1319,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);
        }
index 3ed1f3e03e96dc6737150d4799d6114e3e5e9a88..215a33d3946e51c388b1182764ed13716997b1d1 100644 (file)
@@ -1643,7 +1643,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);