mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
bgpd: evpn RT-5 bgp update carries nexthop attribute
This patch appends nexthop attribute to EVPN message, in addition to appending gateway IP in RT-5 NLRI itself. In reception, if both informations are stored, then the GW IP information will supersede the NLRI nexthop attribute. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
684a7227bd
commit
e9cf8c8ece
@ -2812,6 +2812,39 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi, afi_t nh_afi,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case AFI_L2VPN:
|
||||
switch (safi)
|
||||
{
|
||||
case SAFI_EVPN:
|
||||
if (attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_VPNV4)
|
||||
{
|
||||
stream_putc (s, 12);
|
||||
stream_putl (s, 0); /* RD = 0, per RFC */
|
||||
stream_putl (s, 0);
|
||||
stream_put (s, &attr->extra->mp_nexthop_global_in, 4);
|
||||
}
|
||||
else if (attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL)
|
||||
{
|
||||
stream_putc (s, 24);
|
||||
stream_putl (s, 0); /* RD = 0, per RFC */
|
||||
stream_putl (s, 0);
|
||||
stream_put (s, &attr->extra->mp_nexthop_global, IPV6_MAX_BYTELEN);
|
||||
}
|
||||
else if (attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
|
||||
{
|
||||
stream_putc (s, 48);
|
||||
stream_putl (s, 0); /* RD = 0, per RFC */
|
||||
stream_putl (s, 0);
|
||||
stream_put (s, &attr->extra->mp_nexthop_global, IPV6_MAX_BYTELEN);
|
||||
stream_putl (s, 0); /* RD = 0, per RFC */
|
||||
stream_putl (s, 0);
|
||||
stream_put (s, &attr->extra->mp_nexthop_local, IPV6_MAX_BYTELEN);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user