]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 1 Apr 2020 19:05:26 +0000 (15:05 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 1 Apr 2020 19:05:26 +0000 (15:05 -0400)
This macro is undefined if vnc is disabled, and while it defaults to 0,
this is still wrong and causes issues with -Werror

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
17 files changed:
bgpd/bgp_attr.h
bgpd/bgp_main.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_rd.c
bgpd/bgp_rd.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_vnc_types.h
bgpd/bgp_vpn.c
bgpd/bgp_vty.c
bgpd/bgp_zebra.c
bgpd/bgpd.c
bgpd/rfapi/bgp_rfapi_cfg.h
bgpd/rfapi/rfapi.h
bgpd/rfapi/rfapi_backend.h
bgpd/rfapi/vnc_debug.h

index 98a9a620f76a372c488b2859a0af3e4e146cedf2..8a9902bb9fa9d8f659e878992fc651db8ca3e906 100644 (file)
@@ -87,7 +87,7 @@ struct bgp_attr_encap_subtlv {
        uint8_t value[0]; /* will be extended */
 };
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 /*
  * old rfp<->rfapi representation
  */
@@ -233,7 +233,7 @@ struct attr {
        uint16_t encap_tunneltype;                   /* grr */
        struct bgp_attr_encap_subtlv *encap_subtlvs; /* rfc5512 */
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        struct bgp_attr_encap_subtlv *vnc_subtlvs; /* VNC-specific */
 #endif
        /* EVPN */
index c4ece2f082e2f3737a00ea19cc16d891f2962e33..c14a1a05ac16cfbdd96d2573a6a91cffa8f9aab4 100644 (file)
@@ -228,7 +228,7 @@ static __attribute__((__noreturn__)) void bgp_exit(int status)
        community_list_terminate(bgp_clist);
 
        bgp_vrf_terminate();
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        vnc_zebra_destroy();
 #endif
        bgp_zebra_destroy();
@@ -275,7 +275,7 @@ static int bgp_vrf_enable(struct vrf *vrf)
                        XFREE(MTYPE_BGP, bgp->name_pretty);
                        bgp->name_pretty = XSTRDUP(MTYPE_BGP, "VRF default");
                        bgp->inst_type = BGP_INSTANCE_TYPE_DEFAULT;
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        if (!bgp->rfapi) {
                                bgp->rfapi = bgp_rfapi_new(bgp);
                                assert(bgp->rfapi);
index fbcfe39c3a86b2c354c67cfb3bbc48eff4eb9e0d..46dcd2864e1f9696c163f844135b90e7850ff00f 100644 (file)
@@ -48,7 +48,7 @@
 #include "bgpd/bgp_nht.h"
 #include "bgpd/bgp_evpn.h"
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
 #endif
 
@@ -214,7 +214,7 @@ int bgp_nlri_parse_vpn(struct peer *peer, struct attr *attr,
                        decode_rd_ip(pnt + 5, &rd_ip);
                        break;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                case RD_TYPE_VNC_ETH:
                        break;
 #endif
@@ -1282,7 +1282,7 @@ void vpn_leak_to_vrf_withdraw(struct bgp *bgp_vpn,            /* from */
                zlog_debug("%s: start (path_vpn=%p)", __func__, path_vpn);
 
        if (!path_vpn->net) {
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                /* BGP_ROUTE_RFP routes do not have path_vpn->net set (yet) */
                if (path_vpn->type == ZEBRA_ROUTE_BGP
                    && path_vpn->sub_type == BGP_ROUTE_RFP) {
index 6a229602b2b8d8900896f9d28500a55783cd6ad4..66d64066c4a2dfffda1998b663027014be62e536 100644 (file)
@@ -33,7 +33,7 @@
 #include "bgpd/bgp_rd.h"
 #include "bgpd/bgp_attr.h"
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
 #endif
 
@@ -42,7 +42,7 @@ uint16_t decode_rd_type(const uint8_t *pnt)
        uint16_t v;
 
        v = ((uint16_t)*pnt++ << 8);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        /*
         * VNC L2 stores LHI in lower byte, so omit it
         */
@@ -85,7 +85,7 @@ void decode_rd_ip(const uint8_t *pnt, struct rd_ip *rd_ip)
        rd_ip->val |= (uint16_t)*pnt;
 }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 /* type == RD_TYPE_VNC_ETH */
 void decode_rd_vnc_eth(const uint8_t *pnt, struct rd_vnc_eth *rd_vnc_eth)
 {
@@ -186,7 +186,7 @@ char *prefix_rd2str(const struct prefix_rd *prd, char *buf, size_t size)
                         rd_ip.val);
                return buf;
        }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        else if (type == RD_TYPE_VNC_ETH) {
                snprintf(buf, size, "LHI:%d, %02x:%02x:%02x:%02x:%02x:%02x",
                         *(pnt + 1), /* LHI */
index 56b9023a2e83e68c06751aeb3c98f029d5e4f38b..b5ad9d624d5c26764c0fa3478e52397d402a730e 100644 (file)
@@ -28,7 +28,7 @@
 #define RD_TYPE_IP      1
 #define RD_TYPE_AS4     2
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #define RD_TYPE_VNC_ETH        0xff00  /* VNC L2VPN */
 #endif
 
@@ -46,7 +46,7 @@ struct rd_ip {
        uint16_t val;
 };
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 struct rd_vnc_eth {
        uint16_t type;
        uint8_t local_nve_id;
@@ -60,7 +60,7 @@ extern void encode_rd_type(uint16_t, uint8_t *);
 extern void decode_rd_as(const uint8_t *pnt, struct rd_as *rd_as);
 extern void decode_rd_as4(const uint8_t *pnt, struct rd_as *rd_as);
 extern void decode_rd_ip(const uint8_t *pnt, struct rd_ip *rd_ip);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 extern void decode_rd_vnc_eth(const uint8_t *pnt,
                              struct rd_vnc_eth *rd_vnc_eth);
 #endif
index 9a3ab0d8eebad445f6ed3a09b3bca840168a0c1e..ce1babe45d32ba027e1f3672808900577484d775 100644 (file)
@@ -71,7 +71,7 @@
 #include "bgpd/bgp_mac.h"
 #include "bgpd/bgp_network.h"
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
 #include "bgpd/rfapi/vnc_import_bgp.h"
 #include "bgpd/rfapi/vnc_export_bgp.h"
@@ -1577,7 +1577,7 @@ bool subgroup_announce_check(struct bgp_node *rn, struct bgp_path_info *pi,
        piattr = bgp_path_info_mpath_count(pi) ? bgp_path_info_mpath_attr(pi)
                                               : pi->attr;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (((afi == AFI_IP) || (afi == AFI_IP6)) && (safi == SAFI_MPLS_VPN)
            && ((pi->type == ZEBRA_ROUTE_BGP_DIRECT)
                || (pi->type == ZEBRA_ROUTE_BGP_DIRECT_EXT))) {
@@ -2547,7 +2547,7 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
            && !CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED)
            && !bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) {
                if (bgp_zebra_has_route_changed(rn, old_select)) {
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        vnc_import_bgp_add_route(bgp, p, old_select);
                        vnc_import_bgp_exterior_add_route(bgp, p, old_select);
 #endif
@@ -2615,7 +2615,7 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_node *rn,
                UNSET_FLAG(new_select->flags, BGP_PATH_MULTIPATH_CHG);
        }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if ((afi == AFI_IP || afi == AFI_IP6) && (safi == SAFI_UNICAST)) {
                if (old_select != new_select) {
                        if (old_select) {
@@ -3090,7 +3090,7 @@ static void bgp_rib_withdraw(struct bgp_node *rn, struct bgp_path_info *pi,
                        return;
                }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (safi == SAFI_MPLS_VPN) {
                struct bgp_node *prn = NULL;
                struct bgp_table *table = NULL;
@@ -3277,7 +3277,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
        uint8_t pi_type = 0;
        uint8_t pi_sub_type = 0;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        int vnc_implicit_withdraw = 0;
 #endif
        int same_attr = 0;
@@ -3577,7 +3577,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        if (!CHECK_FLAG(pi->flags, BGP_PATH_HISTORY))
                                bgp_damp_withdraw(pi, rn, afi, safi, 1);
                }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                if (safi == SAFI_MPLS_VPN) {
                        struct bgp_node *prn = NULL;
                        struct bgp_table *table = NULL;
@@ -3667,7 +3667,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        }
                }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                if ((afi == AFI_IP || afi == AFI_IP6)
                    && (safi == SAFI_UNICAST)) {
                        if (vnc_implicit_withdraw) {
@@ -3750,7 +3750,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                } else
                        bgp_path_info_set_flag(rn, pi, BGP_PATH_VALID);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                if (safi == SAFI_MPLS_VPN) {
                        struct bgp_node *prn = NULL;
                        struct bgp_table *table = NULL;
@@ -3801,7 +3801,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        vpn_leak_to_vrf_update(bgp, pi);
                }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                if (SAFI_MPLS_VPN == safi) {
                        mpls_label_t label_decoded = decode_label(label);
 
@@ -3910,7 +3910,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
        /* route_node_get lock */
        bgp_unlock_node(rn);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (safi == SAFI_MPLS_VPN) {
                struct bgp_node *prn = NULL;
                struct bgp_table *table = NULL;
@@ -3950,7 +3950,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
 
                vpn_leak_to_vrf_update(bgp, new);
        }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (SAFI_MPLS_VPN == safi) {
                mpls_label_t label_decoded = decode_label(label);
 
@@ -4007,7 +4007,7 @@ filtered:
 
        bgp_unlock_node(rn);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        /*
         * Filtered update is treated as an implicit withdrawal (see
         * bgp_rib_remove()
@@ -4032,7 +4032,7 @@ int bgp_withdraw(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
        struct bgp_node *rn;
        struct bgp_path_info *pi;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if ((SAFI_MPLS_VPN == safi) || (SAFI_ENCAP == safi)) {
                rfapiProcessWithdraw(peer, NULL, p, prd, NULL, afi, safi, type,
                                     0);
@@ -4530,7 +4530,7 @@ void bgp_clear_route_all(struct peer *peer)
        FOREACH_AFI_SAFI (afi, safi)
                bgp_clear_route(peer, afi, safi);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        rfapiProcessPeerDown(peer);
 #endif
 }
@@ -4918,7 +4918,7 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,
        struct attr attr;
        struct attr *attr_new;
        route_map_result_t ret;
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        int vnc_implicit_withdraw = 0;
 #endif
 
@@ -5000,7 +5000,7 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,
                                bgp_path_info_restore(rn, pi);
                        else
                                bgp_aggregate_decrement(bgp, p, pi, afi, safi);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        if ((afi == AFI_IP || afi == AFI_IP6)
                            && (safi == SAFI_UNICAST)) {
                                if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) {
@@ -5019,7 +5019,7 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,
                        bgp_attr_unintern(&pi->attr);
                        pi->attr = attr_new;
                        pi->uptime = bgp_clock();
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        if ((afi == AFI_IP || afi == AFI_IP6)
                            && (safi == SAFI_UNICAST)) {
                                if (vnc_implicit_withdraw) {
@@ -5188,7 +5188,7 @@ static void bgp_static_withdraw_safi(struct bgp *bgp, const struct prefix *p,
 
        /* Withdraw static BGP route from routing table. */
        if (pi) {
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                rfapiProcessWithdraw(
                        pi->peer, NULL, p, prd, pi->attr, afi, safi, pi->type,
                        1); /* Kill, since it is an administrative change */
@@ -5215,7 +5215,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
        struct attr *attr_new;
        struct attr attr = {0};
        struct bgp_path_info *pi;
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        mpls_label_t label = 0;
 #endif
        uint32_t num_labels = 0;
@@ -5317,7 +5317,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
                        bgp_attr_unintern(&pi->attr);
                        pi->attr = attr_new;
                        pi->uptime = bgp_clock();
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        if (pi->extra)
                                label = decode_label(&pi->extra->label[0]);
 #endif
@@ -5330,7 +5330,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
                            && bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
                                vpn_leak_to_vrf_update(bgp, pi);
                        }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                        rfapiProcessUpdate(pi->peer, NULL, p, &bgp_static->prd,
                                           pi->attr, afi, safi, pi->type,
                                           pi->sub_type, &label);
@@ -5351,7 +5351,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
                new->extra->label[0] = bgp_static->label;
                new->extra->num_labels = num_labels;
        }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        label = decode_label(&bgp_static->label);
 #endif
 
@@ -5370,7 +5370,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
            && bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
                vpn_leak_to_vrf_update(bgp, new);
        }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        rfapiProcessUpdate(new->peer, NULL, p, &bgp_static->prd, new->attr, afi,
                           safi, new->type, new->sub_type, &label);
 #endif
@@ -7936,7 +7936,7 @@ void route_vty_out(struct vty *vty, const struct prefix *p,
                        vty_out(vty, "%s\n", attr->ecommunity->str);
                }
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                /* prints an additional line, indented, with VNC info, if
                 * present */
                if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP))
index 9438b328ad02cea383adcad54f042a6799fb5c3d..e1998633d781485c9ecf24edd00c05a2ab74aa81 100644 (file)
@@ -125,7 +125,7 @@ struct bgp_path_info_extra {
        struct in6_addr sid[BGP_MAX_SIDS];
        uint32_t num_sids;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        union {
 
                struct {
index 2d92136450d9299d1e72ab97f797e9838133a153..8bc4ef6893fc5feb07817a762ac3348c46b0e017 100644 (file)
@@ -64,7 +64,7 @@
 #include "bgpd/bgp_flowspec_util.h"
 #include "bgpd/bgp_encap_types.h"
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
 #endif
 
@@ -3749,7 +3749,7 @@ static void bgp_route_map_process_update_cb(char *rmap_name)
        for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
                bgp_route_map_process_update(bgp, rmap_name, 1);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                /* zlog_debug("%s: calling vnc_routemap_update", __func__); */
                vnc_routemap_update(bgp, __func__);
 #endif
@@ -3793,7 +3793,7 @@ static void bgp_route_map_mark_update(const char *rmap_name)
        } else {
                for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
                        bgp_route_map_process_update(bgp, rmap_name, 0);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                zlog_debug("%s: calling vnc_routemap_update", __func__);
                vnc_routemap_update(bgp, __func__);
 #endif
index f4202ff75e9f1728c69a6f354031d8e182d50128..04847ce6c955974a99828a2cd1df20a0b74ea1f2 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef _QUAGGA_BGP_VNC_TYPES_H
 #define _QUAGGA_BGP_VNC_TYPES_H
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 typedef enum {
        BGP_VNC_SUBTLV_TYPE_LIFETIME = 1,
        BGP_VNC_SUBTLV_TYPE_RFPOPTION = 2, /* deprecated */
index 2fd24435126e8f5998b6fcf680eded5af647dc67..af632a1340020786192c08f66d8ff76cc9ce523b 100644 (file)
@@ -155,7 +155,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
                                uint16_t type;
                                struct rd_as rd_as = {0};
                                struct rd_ip rd_ip = {0};
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                                struct rd_vnc_eth rd_vnc_eth = {0};
 #endif
                                const uint8_t *pnt;
@@ -171,7 +171,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
                                        decode_rd_as4(pnt + 2, &rd_as);
                                else if (type == RD_TYPE_IP)
                                        decode_rd_ip(pnt + 2, &rd_ip);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                                else if (type == RD_TYPE_VNC_ETH)
                                        decode_rd_vnc_eth(pnt, &rd_vnc_eth);
 #endif
@@ -200,7 +200,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
                                                vty_out(vty, "%s:%d",
                                                        inet_ntoa(rd_ip.ip),
                                                        rd_ip.val);
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                                        else if (type == RD_TYPE_VNC_ETH)
                                                vty_out(vty,
                                                        "%u:%02x:%02x:%02x:%02x:%02x:%02x",
index a35bfe47ed11ec5ffc56a0d30e4a81465652eda3..8cdb6b514d8923450c28d4196728e8dfd9eb6dc5 100644 (file)
@@ -68,7 +68,7 @@
 #include "bgpd/bgp_addpath.h"
 #include "bgpd/bgp_mac.h"
 #include "bgpd/bgp_flowspec.h"
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
 #endif
 
@@ -15272,7 +15272,7 @@ int bgp_config_write(struct vty *vty)
 
                hook_call(bgp_inst_config_write, bgp, vty);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                bgp_rfapi_cfg_write(vty, bgp);
 #endif
 
index 404f17f69e4c88348c3118754b248f9c07717007..dd0e35a745c1dbfae4176fcba473fcc51d9c9ade 100644 (file)
@@ -51,7 +51,7 @@
 #include "bgpd/bgp_nht.h"
 #include "bgpd/bgp_bfd.h"
 #include "bgpd/bgp_label.h"
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
 #include "bgpd/rfapi/vnc_export_bgp.h"
 #endif
@@ -1605,7 +1605,7 @@ int bgp_redistribute_set(struct bgp *bgp, afi_t afi, int type,
                if (vrf_bitmap_check(zclient->redist[afi][type], bgp->vrf_id))
                        return CMD_WARNING;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                if (EVPN_ENABLED(bgp) && type == ZEBRA_ROUTE_VNC_DIRECT) {
                        vnc_export_bgp_enable(
                                bgp, afi); /* only enables if mode bits cfg'd */
@@ -1766,7 +1766,7 @@ int bgp_redistribute_unset(struct bgp *bgp, afi_t afi, int type,
  * they operate within bgpd irrespective of zebra connection
  * status. red lookup fails if there is no zebra connection.
  */
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (EVPN_ENABLED(bgp) && type == ZEBRA_ROUTE_VNC_DIRECT) {
                vnc_export_bgp_disable(bgp, afi);
        }
index 6534ac19000242fc7066ff1aa88898789866c649..238a692bdf5f8f7e726b4439597ce833910def92 100644 (file)
@@ -65,7 +65,7 @@
 #include "bgpd/bgp_nexthop.h"
 #include "bgpd/bgp_damp.h"
 #include "bgpd/bgp_mplsvpn.h"
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
 #include "bgpd/rfapi/rfapi_backend.h"
 #endif
@@ -2976,7 +2976,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
 
        bgp->as = *as;
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        if (inst_type != BGP_INSTANCE_TYPE_VRF) {
                bgp->rfapi = bgp_rfapi_new(bgp);
                assert(bgp->rfapi);
@@ -3375,7 +3375,7 @@ int bgp_delete(struct bgp *bgp)
 
 /* TODO - Other memory may need to be freed - e.g., NHT */
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        rfapi_delete(bgp);
 #endif
        bgp_cleanup_routes(bgp);
@@ -5800,7 +5800,7 @@ static void peer_distribute_update(struct access_list *access)
                                }
                        }
                }
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
                vnc_prefix_list_update(bgp);
 #endif
        }
@@ -7036,7 +7036,7 @@ void bgp_init(unsigned short instance)
        /* Init zebra. */
        bgp_zebra_init(bm->master, instance);
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        vnc_zebra_init(bm->master);
 #endif
 
@@ -7051,7 +7051,7 @@ void bgp_init(unsigned short instance)
        bgp_route_map_init();
        bgp_scan_vty_init();
        bgp_mplsvpn_init();
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
        rfapi_init();
 #endif
        bgp_ethernetvpn_init();
index b72d38220be4939314a577fbebf6f13487d2a77e..f1548a6173cb13d09769d75e7aad52c7b32c4dfe 100644 (file)
@@ -24,7 +24,7 @@
 #include "lib/table.h"
 #include "lib/routemap.h"
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 #include "rfapi.h"
 
 struct rfapi_l2_group_cfg {
index 6af2ebeeb8dc34c3d772b71036ca9505a62ced69..beb44aa7803ddbcd77ffa68886d2dfc83396bb87 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef _QUAGGA_BGP_RFAPI_H
 #define _QUAGGA_BGP_RFAPI_H
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 
 #include <stdint.h>
 #include <netinet/in.h>
index 4facc31c602f822dc2e9c9cedc40e9e687afa38f..4d2ae0b02f731b33cb61820d6bed7bd7ca5a1399 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef _QUAGGA_BGP_RFAPI_BACKEND_H
 #define _QUAGGA_BGP_RFAPI_BACKEND_H
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 
 #include "bgpd/bgp_route.h"
 #include "bgpd/bgp_nexthop.h"
index dd49383072aad73b47e6d46eec350f21d31811de..c472b6366e4bbfedcdc1525c5fe540025160909d 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef _QUAGGA_BGP_VNC_DEBUG_H
 #define _QUAGGA_BGP_VNC_DEBUG_H
 
-#if ENABLE_BGP_VNC
+#ifdef ENABLE_BGP_VNC
 
 /*
  * debug state storage