Merge pull request #3145 from pguibert6WIND/ipv6nexthop

bgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case
This commit is contained in:
Donald Sharp 2018-10-10 10:08:01 -04:00 committed by GitHub
commit 8a7599cd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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); 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)); memset(&nexthop_orig, 0, sizeof(nexthop_orig));
nexthop_orig.family = nhfamily; 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 = static_attr.mp_nexthop_len =
info_vpn->attr->mp_nexthop_len; info_vpn->attr->mp_nexthop_len;
} }
static_attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_NEXT_HOP);
break; break;
case AF_INET6: case AF_INET6:
/* save */ /* save */