From 070783e69323b3c6401d9b6dff4ab8e74656d02d Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 25 Aug 2020 10:26:29 -0300 Subject: [PATCH] lib: fix a crash in zebra style access list When removing an IPv4 prefix configuration the wrong amount of bytes will be read from `struct prefix_ipv4` from `DEFPY`, so lets use the proper function for this. Signed-off-by: Rafael Zalamena --- lib/filter_cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/filter_cli.c b/lib/filter_cli.c index 6529fd6e18..85cb8175f5 100644 --- a/lib/filter_cli.c +++ b/lib/filter_cli.c @@ -104,7 +104,8 @@ static int64_t acl_zebra_get_seq(struct access_list *acl, const char *action, f.type = FILTER_DENY; fz = &f.u.zfilter; - fz->prefix = *p; + if (p->family) + prefix_copy(&fz->prefix, p); fz->exact = exact; fn = filter_lookup_zebra(acl, &f);