diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-01-17 22:26:33 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2017-02-14 13:58:59 +0100 |
commit | 4895ca359525b5242d92793d30ef2eaddee06768 (patch) | |
tree | bc2ddfdc021e95d15deb24bb9d28f3df7907a9e4 /bgpd/bgp_evpn.c | |
parent | bgpd: fix show bgp l2vpn evpn all tag command (diff) | |
download | frr-4895ca359525b5242d92793d30ef2eaddee06768.tar.xz frr-4895ca359525b5242d92793d30ef2eaddee06768.zip |
bgpd: use HAVE_EVPN to disable evpn frame handling
Transmission and Reception routines have a part of code that is
conditionnally compiled to the usage of HAVE_EVPN. Also, each time a
subfield of prefix evpn is reached, like in configuration also, then a
conditionnaly compilation with HAVE_EVPN is used.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_evpn.c')
-rw-r--r-- | bgpd/bgp_evpn.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index a9db7d236..98661d7c3 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -60,8 +60,7 @@ bgp_nlri_parse_evpn (struct peer *peer, struct attr *attr, #if !defined(HAVE_EVPN) return -1; -#endif /* HAVE_EVPN */ - +#else p_evpn_p = &p.u.prefix_evpn; pnt = packet->nlri; lim = pnt + packet->length; @@ -184,7 +183,7 @@ bgp_nlri_parse_evpn (struct peer *peer, struct attr *attr, /* Packet length consistency check. */ if (pnt != lim) return -1; - +#endif /* !(HAVE_EVPN) */ return 0; } @@ -193,6 +192,7 @@ bgp_packet_mpattr_route_type_5 (struct stream *s, struct prefix *p, struct prefix_rd *prd, u_char *label, struct attr *attr) { +#if defined(HAVE_EVPN) int len; char temp[16]; struct evpn_addr *p_evpn_p; @@ -237,4 +237,5 @@ bgp_packet_mpattr_route_type_5 (struct stream *s, else stream_put3 (s, 0); return; +#endif /* (HAVE_EVPN) */ } |