mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 22:37:49 +00:00
bgpd: update mp_nexthop field in case mp-bgp entry is created
In case a manual set of MPLS, ENCAP, or EVPN entry is set, then the nexthop attribute localted in attr->extra structure must be changed too. In standard cases, where IPv4 IGP nexthop address is picked up, the same address ie chosen. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
3da6fcd557
commit
061e9fdea5
@ -4006,6 +4006,14 @@ bgp_static_update_safi (struct bgp *bgp, struct prefix *p,
|
||||
attr.med = bgp_static->igpmetric;
|
||||
attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC);
|
||||
|
||||
if ((safi == SAFI_EVPN) || (safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP))
|
||||
{
|
||||
if (bgp_static->igpnexthop.s_addr)
|
||||
{
|
||||
bgp_attr_extra_get (&attr)->mp_nexthop_global_in = bgp_static->igpnexthop;
|
||||
bgp_attr_extra_get (&attr)->mp_nexthop_len = IPV4_MAX_BYTELEN;
|
||||
}
|
||||
}
|
||||
if(afi == AFI_L2VPN)
|
||||
{
|
||||
if (bgp_static->gatewayIp.family == AF_INET)
|
||||
|
Loading…
Reference in New Issue
Block a user