summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-07-10 15:22:13 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-07-10 15:22:13 +0200
commitd54600fa83f0a151ee1eddcd81998348e7995fee (patch)
treeab9a7000eea1898e9ee5ae189a19967df3be664f
parent6b479dff80ba32ab687cedeb1f05c9177da2c812 (diff)
bgpd: ability to set vpnv4 nexthop with route-map
Ability to set nexthop IP pointer with route-map. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
-rw-r--r--bgpd/bgp_routemap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index f7c79f873d..f9f5142cd0 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -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);
}
}