If vpnv4 capability has to be sent, then the correct safi parameter
is sent instead of internal value.
In case BGP open graceful restart capability is applied to EVPN, then
the flags to be set are modified to be official afi and safi parameters,
and not internal value.

Signed-off-by: Philippe Guibert <philippe.guib...@6wind.com>
---
 bgpd/bgp_open.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 5ce838b899dc..4e5ef30ccf2d 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -1149,8 +1149,16 @@ bgp_open_capability (struct stream *s, struct peer *peer)
         for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
           if (peer->afc[afi][safi])
             {
-              stream_putw (s, afi);
-              stream_putc (s, safi);
+              if(afi == AFI_INTERNAL_L2VPN)
+                stream_putw (s, AFI_L2VPN);
+              else
+                stream_putw (s, afi);
+              if(safi == SAFI_MPLS_VPN)
+                stream_putc (s, SAFI_MPLS_LABELED_VPN);
+              else if(safi == SAFI_INTERNAL_EVPN)
+                stream_putc (s, SAFI_EVPN );
+              else
+                stream_putc (s, safi);
               stream_putc (s, 0); //Forwarding is not retained as of now.
             }
     }
-- 
2.1.4


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

Reply via email to