diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-05-01 12:10:40 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-06-05 14:36:53 -0300 |
| commit | 744ad1afb4f889494fb809242ae08609f0b1db68 (patch) | |
| tree | 5452b4d6d3ff7b349b2bd0e4429c21d174ad8d9e /lib/filter_nb.c | |
| parent | a7b2821884074b0e16a4de4588a8b27b6ae086be (diff) | |
lib: properly apply prefix list entries
After the commands started working I noticed that prefix lists were
still not working and displaying incorrect information in
`show ip prefix-list`.
Turns out `any` must be set to `0` when a prefix is set and the prefix
entry **must** be installed in the prefix list head.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib/filter_nb.c')
| -rw-r--r-- | lib/filter_nb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/filter_nb.c b/lib/filter_nb.c index 0f6e5488fc..54811ac245 100644 --- a/lib/filter_nb.c +++ b/lib/filter_nb.c @@ -409,8 +409,8 @@ static int lib_access_list_legacy_entry_destination_network_modify( f = nb_running_get_entry(args->dnode, NULL, true); fc = &f->u.cfilter; yang_dnode_get_prefix(&p, args->dnode, NULL); - fc->addr.s_addr = ipv4_network_addr(p.u.prefix4.s_addr, p.prefixlen); - masklen2ip(p.prefixlen, &fc->addr_mask); + fc->mask.s_addr = ipv4_network_addr(p.u.prefix4.s_addr, p.prefixlen); + masklen2ip(p.prefixlen, &fc->mask_mask); return NB_OK; } @@ -904,6 +904,7 @@ lib_prefix_list_entry_ipv4_prefix_modify(struct nb_cb_modify_args *args) prefix_list_entry_update_start(ple); yang_dnode_get_prefix(&ple->prefix, args->dnode, NULL); + ple->any = 0; /* Finish prefix entry update procedure. */ prefix_list_entry_update_finish(ple); |
