summaryrefslogtreecommitdiffstats
path: root/zebra/rule_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-04-09 01:09:29 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2020-04-10 01:04:45 +0200
commitb6d34c260939cdcf7bba327108d2de35fc58fb54 (patch)
tree67e1f866a9f13695149ff98505d95d30f26822ba /zebra/rule_netlink.c
parentpbrd: separate `set *` and `no set *` commands (diff)
downloadfrr-b6d34c260939cdcf7bba327108d2de35fc58fb54.tar.xz
frr-b6d34c260939cdcf7bba327108d2de35fc58fb54.zip
zebra: set family on read in rule prefix
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>
Diffstat (limited to 'zebra/rule_netlink.c')
-rw-r--r--zebra/rule_netlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c
index 34df2485c..a361f73c1 100644
--- a/zebra/rule_netlink.c
+++ b/zebra/rule_netlink.c
@@ -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;
}