bgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case

In mpls vpn import/export, the nexthop attribute should also be
recognised for ipv6 too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2018-10-08 14:15:12 +02:00
parent 4d43d33d25
commit 75cd35c697

View File

@ -1088,6 +1088,8 @@ static void vpn_leak_to_vrf_update_onevrf(struct bgp *bgp_vrf, /* to */
*/
uint8_t nhfamily = NEXTHOP_FAMILY(info_vpn->attr->mp_nexthop_len);
if (nhfamily != AF_UNSPEC)
static_attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
memset(&nexthop_orig, 0, sizeof(nexthop_orig));
nexthop_orig.family = nhfamily;
@ -1107,7 +1109,6 @@ static void vpn_leak_to_vrf_update_onevrf(struct bgp *bgp_vrf, /* to */
static_attr.mp_nexthop_len =
info_vpn->attr->mp_nexthop_len;
}
static_attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
break;
case AF_INET6:
/* save */