Mailing List Archive

[PATCH 29/57] 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>
---
bgpd/bgp_attr.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 5d333c2edbe2..5c5bafa8af81 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -2491,6 +2491,20 @@ bgp_packet_mpattr_start (struct stream *s, afi_t afi, safi_t safi,
break;
}
break;
+ case AFI_INTERNAL_L2VPN:
+ switch (safi)
+ {
+ case SAFI_INTERNAL_EVPN:
+ /* XXX assumption : NH as MPLSVPN, and IPv4 */
+ 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);
+ break;
+ break;
+ default:
+ break;
+ }
default:
break;
}
--
2.1.4


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev