]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix a crash in zebra style access list
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 25 Aug 2020 13:26:29 +0000 (10:26 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 25 Aug 2020 13:35:46 +0000 (10:35 -0300)
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 <rzalamena@opensourcerouting.org>
lib/filter_cli.c

index 6529fd6e189704bb38b1287e6b19769acc270b78..85cb8175f589cb0a0bd2d064df4424ca9750478a 100644 (file)
@@ -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);