]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: set family on read in rule prefix
authorStephen Worley <sworley@cumulusnetworks.com>
Wed, 8 Apr 2020 23:09:29 +0000 (19:09 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Thu, 9 Apr 2020 23:04:45 +0000 (19:04 -0400)
We were not setting the family for the prefix on the src/dst
IP of the rule.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/rule_netlink.c

index 34df2485c0b2a00ec53fe96868d4a6927a9657bc..a361f73c102e87cbd2a35bca6582cb868591ddbd 100644 (file)
@@ -271,6 +271,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        memcpy(&rule.rule.filter.src_ip.u.prefix6,
                               RTA_DATA(tb[FRA_SRC]), 16);
                rule.rule.filter.src_ip.prefixlen = frh->src_len;
+               rule.rule.filter.src_ip.family = frh->family;
                rule.rule.filter.filter_bm |= PBR_FILTER_SRC_IP;
        }
 
@@ -282,6 +283,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        memcpy(&rule.rule.filter.dst_ip.u.prefix6,
                               RTA_DATA(tb[FRA_DST]), 16);
                rule.rule.filter.dst_ip.prefixlen = frh->dst_len;
+               rule.rule.filter.dst_ip.family = frh->family;
                rule.rule.filter.filter_bm |= PBR_FILTER_DST_IP;
        }