]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: ability to set vpnv4 nexthop with route-map 2647/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 10 Jul 2018 13:22:13 +0000 (15:22 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 10 Jul 2018 13:22:13 +0000 (15:22 +0200)
Ability to set nexthop IP pointer with route-map.

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

index f7c79f873df0b84d35cf7d4e3f2180b84981798c..f9f5142cd08260763a85793dee15788474928518 100644 (file)
@@ -1298,6 +1298,9 @@ static route_map_result_t route_set_ip_nexthop(void *rule,
                        bgp_info->attr->nexthop = *rins->address;
                        SET_FLAG(bgp_info->attr->rmap_change_flags,
                                 BATTR_RMAP_IPV4_NHOP_CHANGED);
+                       /* case for MP-BGP : MPLS VPN */
+                       bgp_info->attr->mp_nexthop_global_in = *rins->address;
+                       bgp_info->attr->mp_nexthop_len = sizeof(*rins->address);
                }
        }