]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 8 Oct 2018 12:15:12 +0000 (14:15 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 10 Oct 2018 11:13:09 +0000 (13:13 +0200)
In mpls vpn import/export, the nexthop attribute should also be
recognised for ipv6 too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_mplsvpn.c

index 276945cbf65b72afd2d7aba895f57a803bf2ee0b..63a24fc4c7bb79907679db6c0a7aa2077cc95aef 100644 (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 */