From: Donald Sharp Date: Wed, 4 Nov 2020 14:11:53 +0000 (-0500) Subject: bgpd: Fix up rule encoding to zebra so it works X-Git-Tag: base_7.6~316^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F7456%2Fhead;p=mirror%2Ffrr.git bgpd: Fix up rule encoding to zebra so it works Recent changes to the rule encoding that were made did not get reflected in bgpd. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 00213b4239..957db4cbc1 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -2390,6 +2390,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s, { struct prefix pfx; uint8_t fam = AF_INET; + char ifname[INTERFACE_NAMSIZ]; if (pbra->nh.type == NEXTHOP_TYPE_IPV6) fam = AF_INET6; @@ -2431,7 +2432,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s, stream_put(s, &pfx.u.prefix, prefix_blen(&pfx)); stream_putw(s, 0); /* dst port */ - + stream_putc(s, 0); /* dsfield */ /* if pbr present, fwmark is not used */ if (pbr) stream_putl(s, 0); @@ -2440,7 +2441,8 @@ static void bgp_encode_pbr_rule_action(struct stream *s, stream_putl(s, pbra->table_id); - stream_putl(s, 0); /* ifindex unused */ + memset(ifname, 0, sizeof(ifname)); + stream_put(s, ifname, INTERFACE_NAMSIZ); /* ifname unused */ } static void bgp_encode_pbr_ipset_match(struct stream *s,