From 523cafc4181b4d9f26147d44f71ba0d9b7adef53 Mon Sep 17 00:00:00 2001 From: mitesh Date: Wed, 27 Dec 2017 11:47:10 -0800 Subject: [PATCH] bgpd, lib, zebra: fix style problems Signed-off-by: Mitesh Kanjariya --- bgpd/bgp_evpn.c | 41 +++++++++++++++++++++++++++-------------- bgpd/bgp_evpn.h | 7 ++++--- bgpd/bgp_evpn_private.h | 20 ++++++++++---------- bgpd/bgp_evpn_vty.c | 27 ++++++++++++++++++--------- bgpd/bgp_zebra.c | 9 ++++++--- bgpd/bgpd.c | 3 ++- lib/prefix.h | 2 +- lib/vrf.h | 2 +- zebra/main.c | 6 ++++-- zebra/zebra_vxlan.c | 35 +++++++++++++++++++++++------------ zebra/zebra_vxlan.h | 17 ++++++++++------- zebra/zserv.c | 3 ++- 12 files changed, 108 insertions(+), 64 deletions(-) diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 321d94860f..926549cb4f 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -687,7 +687,8 @@ static void build_evpn_route_extcomm(struct bgpevpn *vpn, struct attr *attr, attr->ecommunity = ecommunity_merge(attr->ecommunity, ecom); /* Add the export RTs for L3VNI - currently only supported for IPV4 host - * routes */ + * routes + */ if (afi == AFI_IP) { vrf_export_rtl = bgpevpn_get_vrf_export_rtl(vpn); if (vrf_export_rtl && !list_isempty(vrf_export_rtl)) { @@ -974,7 +975,8 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_def, } /* create a new route entry if one doesnt exist. - Otherwise see if route attr has changed */ + Otherwise see if route attr has changed + */ if (!local_ri) { /* route has changed as this is the first entry */ @@ -1696,7 +1698,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf, memset(pp, 0, sizeof(struct prefix)); if (evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE) ip_prefix_from_type2_prefix(evp, pp); - else if(evp->prefix.route_type == BGP_EVPN_IP_PREFIX_ROUTE) + else if (evp->prefix.route_type == BGP_EVPN_IP_PREFIX_ROUTE) ip_prefix_from_type5_prefix(evp, pp); if (bgp_debug_zebra(NULL)) { @@ -2122,7 +2124,8 @@ static int install_uninstall_routes_for_vrf(struct bgp *bgp_vrf, for (ri = rn->info; ri; ri = ri->next) { /* Consider "valid" remote routes applicable for - * this VRF. */ + * this VRF. + */ if (!(CHECK_FLAG(ri->flags, BGP_INFO_VALID) && ri->type == ZEBRA_ROUTE_BGP && ri->sub_type == BGP_ROUTE_NORMAL)) @@ -2231,7 +2234,8 @@ static int install_uninstall_routes_for_vni(struct bgp *bgp, } /* Install any existing remote routes applicable for this VRF into VRF RIB. This - * is invoked upon l3vni-add or l3vni import rt change */ + * is invoked upon l3vni-add or l3vni import rt change + */ static int install_routes_for_vrf(struct bgp *bgp_vrf) { install_uninstall_routes_for_vrf(bgp_vrf, 1); @@ -2417,14 +2421,16 @@ static int install_uninstall_evpn_route(struct bgp *bgp, afi_t afi, safi_t safi, continue; /* Import route into matching l2-vnis (type-2/type-3 routes go - * into l2vni table) */ + * into l2vni table) + */ irt = lookup_import_rt(bgp, eval); if (irt && irt->vnis) install_uninstall_route_in_vnis(bgp, afi, safi, evp, ri, irt->vnis, import); /* Import route into matching l3-vnis (type-2/type-5 routes go - * into l3vni/vrf table) */ + * into l3vni/vrf table) + */ vrf_irt = lookup_vrf_import_rt(eval); if (vrf_irt && vrf_irt->vrfs) install_uninstall_route_in_vrfs(bgp, afi, safi, evp, ri, @@ -2940,7 +2946,8 @@ static void evpn_mpattr_encode_type5(struct stream *s, struct prefix *p, p_evpn_p = &(p->u.prefix_evpn); /* len denites the total len of IP and GW-IP in the route - IP and GW-IP have to be both ipv4 or ipv6 */ + IP and GW-IP have to be both ipv4 or ipv6 + */ if (IS_IPADDR_V4(&p_evpn_p->ip)) len = 8; /* IP and GWIP are both ipv4 */ else @@ -3284,11 +3291,13 @@ void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw) if (withdraw) { /* delete and withdraw all the type-5 routes - stored in the global table for this vrf */ + stored in the global table for this vrf + */ withdraw_router_id_vrf(bgp); /* delete all the VNI routes (type-2/type-3) routes for all the - * L2-VNIs */ + * L2-VNIs + */ hash_iterate(bgp->vnihash, (void (*)(struct hash_backet *, void *))withdraw_router_id_vni, @@ -3296,11 +3305,13 @@ void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw) } else { /* advertise all routes in the vrf as type-5 routes with the new - * RD */ + * RD + */ update_router_id_vrf(bgp); /* advertise all the VNI routes (type-2/type-3) routes with the - * new RD*/ + * new RD + */ hash_iterate(bgp->vnihash, (void (*)(struct hash_backet *, void *))update_router_id_vni, @@ -4067,7 +4078,8 @@ int bgp_evpn_local_l3vni_add(vni_t l3vni, as_t as = 0; /* get the default instamce - required to get the AS number for VRF - * auto-creation*/ + * auto-creatio + */ bgp_def = bgp_get_default(); if (!bgp_def) { zlog_err("Cannot process L3VNI %u ADD - default BGP instance not yet created", @@ -4159,7 +4171,8 @@ int bgp_evpn_local_l3vni_del(vni_t l3vni, } /* unimport remote routes from VRF, if it is AUTO vrf bgp_delete will - * take care of uninstalling the routes from zebra */ + * take care of uninstalling the routes from zebra + */ if (!CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_AUTO)) uninstall_routes_for_vrf(bgp_vrf); diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h index 38e56b3bb1..9400916845 100644 --- a/bgpd/bgp_evpn.h +++ b/bgpd/bgp_evpn.h @@ -44,7 +44,7 @@ extern void bgp_evpn_withdraw_type5_routes(struct bgp *bgp_vrf, afi_t afi, safi_t safi); extern void bgp_evpn_advertise_type5_routes(struct bgp *bgp_vrf, afi_t afi, safi_t safi); -extern void bgp_evpn_vrf_delete(struct bgp *); +extern void bgp_evpn_vrf_delete(struct bgp *bgp_vrf); extern void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw); extern char *bgp_evpn_label2str(mpls_label_t *label, char *buf, int len); extern char *bgp_evpn_route2str(struct prefix_evpn *p, char *buf, int len); @@ -65,9 +65,10 @@ extern int bgp_evpn_local_macip_del(struct bgp *bgp, vni_t vni, extern int bgp_evpn_local_macip_add(struct bgp *bgp, vni_t vni, struct ethaddr *mac, struct ipaddr *ip, u_char flags); -extern int bgp_evpn_local_l3vni_add(vni_t, vrf_id_t, struct ethaddr *, +extern int bgp_evpn_local_l3vni_add(vni_t vni, vrf_id_t vrf_id, + struct ethaddr *rmac, struct in_addr originator_ip); -extern int bgp_evpn_local_l3vni_del(vni_t, vrf_id_t); +extern int bgp_evpn_local_l3vni_del(vni_t vni, vrf_id_t vrf_id); extern int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni); extern int bgp_evpn_local_vni_add(struct bgp *bgp, vni_t vni, struct in_addr originator_ip, diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h index 12f997bebb..2d52e1995d 100644 --- a/bgpd/bgp_evpn_private.h +++ b/bgpd/bgp_evpn_private.h @@ -377,14 +377,14 @@ static inline int advertise_type5_routes(struct bgp *bgp_vrf, } extern void evpn_rt_delete_auto(struct bgp*, vni_t, struct list*); -extern void bgp_evpn_configure_export_rt_for_vrf(struct bgp*, - struct ecommunity*); -extern void bgp_evpn_unconfigure_export_rt_for_vrf(struct bgp*, - struct ecommunity*); -extern void bgp_evpn_configure_import_rt_for_vrf(struct bgp*, - struct ecommunity*); -extern void bgp_evpn_unconfigure_import_rt_for_vrf(struct bgp*, - struct ecommunity*); +extern void bgp_evpn_configure_export_rt_for_vrf(struct bgp *bgp_vrf, + struct ecommunity *ecomadd); +extern void bgp_evpn_unconfigure_export_rt_for_vrf(struct bgp *bgp_vrf, + struct ecommunity *ecomdel); +extern void bgp_evpn_configure_import_rt_for_vrf(struct bgp *bgp_vrf, + struct ecommunity *ecomadd); +extern void bgp_evpn_unconfigure_import_rt_for_vrf(struct bgp *bgp_vrf, + struct ecommunity *ecomdel); extern int bgp_evpn_handle_export_rt_change(struct bgp *bgp, struct bgpevpn *vpn); extern void bgp_evpn_handle_vrf_rd_change(struct bgp *bgp_vrf, int withdraw); @@ -392,8 +392,8 @@ extern void bgp_evpn_handle_rd_change(struct bgp *bgp, struct bgpevpn *vpn, int withdraw); extern int bgp_evpn_install_routes(struct bgp *bgp, struct bgpevpn *vpn); extern int bgp_evpn_uninstall_routes(struct bgp *bgp, struct bgpevpn *vpn); -extern void bgp_evpn_map_vrf_to_its_rts(struct bgp *); -extern void bgp_evpn_unmap_vrf_from_its_rts(struct bgp *); +extern void bgp_evpn_map_vrf_to_its_rts(struct bgp *bgp_vrf); +extern void bgp_evpn_unmap_vrf_from_its_rts(struct bgp *bgp_vrf); extern void bgp_evpn_map_vni_to_its_rts(struct bgp *bgp, struct bgpevpn *vpn); extern void bgp_evpn_unmap_vni_from_its_rts(struct bgp *bgp, struct bgpevpn *vpn); diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index aadf1f4f04..7b631687d8 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -1496,7 +1496,8 @@ static void evpn_configure_vrf_rd(struct bgp *bgp_vrf, struct prefix_rd *rd) { /* If we have already advertise type-5 routes with a diffrent RD, we - * have to delete and withdraw them first*/ + * have to delete and withdraw them firs + */ bgp_evpn_handle_vrf_rd_change(bgp_vrf, 1); /* update RD */ @@ -1504,7 +1505,8 @@ static void evpn_configure_vrf_rd(struct bgp *bgp_vrf, SET_FLAG(bgp_vrf->vrf_flags, BGP_VRF_RD_CFGD); /* We have a new RD for VRF. - * Advertise all type-5 routes again with the new RD */ + * Advertise all type-5 routes again with the new RD + */ bgp_evpn_handle_vrf_rd_change(bgp_vrf, 0); } @@ -1514,14 +1516,16 @@ static void evpn_configure_vrf_rd(struct bgp *bgp_vrf, static void evpn_unconfigure_vrf_rd(struct bgp *bgp_vrf) { /* If we have already advertise type-5 routes with a diffrent RD, we - * have to delete and withdraw them first*/ + * have to delete and withdraw them firs + */ bgp_evpn_handle_vrf_rd_change(bgp_vrf, 1); /* fall back to default RD */ bgp_evpn_derive_auto_rd_for_vrf(bgp_vrf); /* We have a new RD for VRF. - * Advertise all type-5 routes again with the new RD */ + * Advertise all type-5 routes again with the new RD + */ bgp_evpn_handle_vrf_rd_change(bgp_vrf, 0); } @@ -1578,7 +1582,8 @@ static struct bgpevpn *evpn_create_update_vni(struct bgp *bgp, vni_t vni) vpn = bgp_evpn_lookup_vni(bgp, vni); if (!vpn) { /* tenant vrf will be updated when we get local_vni_add from - * zebra */ + * zebra + */ vpn = bgp_evpn_new(bgp, vni, bgp->router_id, 0); if (!vpn) { zlog_err( @@ -2466,7 +2471,8 @@ DEFUN (bgp_evpn_advertise_type5, if (afi == AFI_IP) { /* if we are already advertising ipv4 prefix as type-5 - * nothing to do */ + * nothing to do + */ if (!CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV4_IN_EVPN)) { SET_FLAG(bgp_vrf->vrf_flags, @@ -2476,7 +2482,8 @@ DEFUN (bgp_evpn_advertise_type5, } else { /* if we are already advertising ipv6 prefix as type-5 - * nothing to do */ + * nothing to do + */ if (!CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV6_IN_EVPN)) { SET_FLAG(bgp_vrf->vrf_flags, @@ -2519,7 +2526,8 @@ DEFUN (no_bgp_evpn_advertise_type5, if (afi == AFI_IP) { /* if we are already advertising ipv4 prefix as type-5 - * nothing to do */ + * nothing to do + */ if (CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV4_IN_EVPN)) { bgp_evpn_withdraw_type5_routes(bgp_vrf, afi, safi); @@ -2529,7 +2537,8 @@ DEFUN (no_bgp_evpn_advertise_type5, } else { /* if we are already advertising ipv6 prefix as type-5 - * nothing to do */ + * nothing to do + */ if (CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_ADVERTISE_IPV6_IN_EVPN)) { bgp_evpn_withdraw_type5_routes(bgp_vrf, afi, safi); diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 9c6969a96a..7f2dd5d94d 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1018,7 +1018,8 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p, /* If it is an EVPN route mark as such. * Currently presence of rmac in attr denotes - * this is an EVPN type-2 route */ + * this is an EVPN type-2 route + */ if (!is_zero_mac(&(info->attr->rmac))) SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE); @@ -1081,7 +1082,8 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p, api_nh->gate.ipv4 = *nexthop; /* EVPN type-2 routes are - programmed as onlink on l3-vni SVI */ + programmed as onlink on l3-vni SVI + */ if (CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) api_nh->type = NEXTHOP_TYPE_IPV4_IFINDEX; else @@ -1257,7 +1259,8 @@ void bgp_zebra_withdraw(struct prefix *p, struct bgp_info *info, safi_t safi) /* If it is an EVPN route mark as such. * Currently presence of rmac in attr denotes - * this is an EVPN type-2 route */ + * this is an EVPN type-2 route + */ if (!is_zero_mac(&(info->attr->rmac))) SET_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 4e5fe1c7ea..66893c1f55 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7403,7 +7403,8 @@ void bgp_master_init(struct thread_master *master) /* init the rd id space. assign 0th index in the bitfield, - so that we start with id 1 */ + so that we start with id 1 + */ bf_init(bm->rd_idspace, UINT16_MAX); bf_assign_zero_index(bm->rd_idspace); diff --git a/lib/prefix.h b/lib/prefix.h index 7408c75e11..7e947ea48a 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -348,7 +348,7 @@ extern void masklen2ip6(const int, struct in6_addr *); extern const char *inet6_ntoa(struct in6_addr); -extern int is_zero_mac(struct ethaddr *); +extern int is_zero_mac(struct ethaddr *mac); extern int prefix_str2mac(const char *str, struct ethaddr *mac); extern char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size); diff --git a/lib/vrf.h b/lib/vrf.h index 19e8ac9162..9afca4c6fb 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -103,7 +103,7 @@ extern struct vrf_name_head vrfs_by_name; extern struct vrf *vrf_lookup_by_id(vrf_id_t); extern struct vrf *vrf_lookup_by_name(const char *); extern struct vrf *vrf_get(vrf_id_t, const char *); -extern const char *vrf_id_to_name(vrf_id_t); +extern const char *vrf_id_to_name(vrf_id_t vrf_id); extern vrf_id_t vrf_name_to_id(const char *); #define VRF_GET_ID(V, NAME) \ diff --git a/zebra/main.c b/zebra/main.c index ada9f5e4e3..e26c8e3d69 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -321,8 +321,10 @@ int main(int argc, char **argv) * routing socket. */ zebra_ns_init(); - /* Initialize show/config command after the vrf initialization is - * complete */ + /* + * Initialize show/config command after the vrf initialization is + * complete + */ zebra_vty_init(); #if defined(HANDLE_ZAPI_FUZZING) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 97410545a0..0ef1802367 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2625,9 +2625,11 @@ static void zvni_build_hash_table() zl3vni->local_vtep_ip = vxl->vtep_ip; zl3vni->vxlan_if = ifp; - /* we need to associate with SVI. + /* + * we need to associate with SVI. * we can associate with svi-if only after association - * with vxlan-intf is complete */ + * with vxlan-intf is complete + */ zl3vni->svi_if = zl3vni_map_to_svi_if(zl3vni); if (is_l3vni_oper_up(zl3vni)) @@ -2983,7 +2985,8 @@ static int zl3vni_rmac_uninstall(zebra_l3vni_t *zl3vni, return 0; if (!zl3vni->vxlan_if) { - zlog_err("RMAC %s on L3-VNI %u hash %p couldn't be uninstalled - no vxlan_if", + zlog_err( + "RMAC %s on L3-VNI %u hash %p couldn't be uninstalled - no vxlan_if", prefix_mac2str(&zrmac->macaddr, buf, sizeof(buf)), zl3vni->vni, zl3vni); return -1; @@ -3228,7 +3231,7 @@ static int zl3vni_remote_nh_del(zebra_l3vni_t *zl3vni, * readd stale entries. */ static int zl3vni_local_nh_add_update(zebra_l3vni_t *zl3vni, - struct ipaddr *ip, u_int16_t state) + struct ipaddr *ip, u_int16_t state) { #ifdef GNU_LINUX zebra_neigh_t *n = NULL; @@ -3258,7 +3261,8 @@ static int zl3vni_local_nh_del(zebra_l3vni_t *zl3vni, /* all next hop neigh are remote and installed by frr. * If we get an age out notification for these neigh entries, we have to - * install it back */ + * install it back + */ zl3vni_nh_install(zl3vni, n); return 0; @@ -3643,7 +3647,8 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, * that it can be reprogrammed as L3-VNI in the system. It is also * possible that the vrf-vni mapping is removed from FRR while the vxlan * interface is still present in kernel. In this case to keep it - * symmetric, we will delete the l3-vni and reprogram it as l2-vni */ + * symmetric, we will delete the l3-vni and reprogram it as l2-vni + */ if (add) { /* Locate hash entry */ zvni = zvni_lookup(vni); @@ -3674,7 +3679,8 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, /* TODO_MITESH: This needs to be thought through. We don't have * enough information at this point to reprogram the vni as * l2-vni. One way is to store the required info in l3-vni and - * used it solely for this purpose */ + * used it solely for this purpose + */ } return 0; @@ -4549,7 +4555,8 @@ int zebra_vxlan_local_neigh_del(struct interface *ifp, zebra_l3vni_t *zl3vni = NULL; /* check if this is a remote neigh entry corresponding to remote - * next-hop */ + * next-hop + */ zl3vni = zl3vni_from_svi(ifp, link_if); if (zl3vni) return zl3vni_local_nh_del(zl3vni, ip); @@ -5906,7 +5913,8 @@ int zebra_vxlan_if_up(struct interface *ifp) } /* we need to associate with SVI, if any, we can associate with - * svi-if only after association with vxlan-intf is complete */ + * svi-if only after association with vxlan-intf is complete + */ zl3vni->svi_if = zl3vni_map_to_svi_if(zl3vni); if (is_l3vni_oper_up(zl3vni)) @@ -6083,7 +6091,8 @@ int zebra_vxlan_if_update(struct interface *ifp, u_int16_t chgflags) } /* access-vlan change - process oper down, associate with new - * svi_if and then process oper up again */ + * svi_if and then process oper up again + */ if (chgflags & ZEBRA_VXLIF_VLAN_CHANGE) { if (if_is_operative(ifp)) { zebra_vxlan_process_l3vni_oper_down(zl3vni); @@ -6341,12 +6350,14 @@ int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf, zvrf->l3vni = vni; /* associate with vxlan-intf; - * we need to associate with the vxlan-intf first */ + * we need to associate with the vxlan-intf first + */ zl3vni->vxlan_if = zl3vni_map_to_vxlan_if(zl3vni); /* associate with corresponding SVI interface, we can associate * with svi-if only after vxlan interface association is - * complete */ + * complete + */ zl3vni->svi_if = zl3vni_map_to_svi_if(zl3vni); /* formulate l2vni list */ diff --git a/zebra/zebra_vxlan.h b/zebra/zebra_vxlan.h index d2ace241e9..b7def6acf8 100644 --- a/zebra/zebra_vxlan.h +++ b/zebra/zebra_vxlan.h @@ -52,7 +52,7 @@ is_evpn_enabled() #define VNI_STR_LEN 32 extern ifindex_t get_l3vni_svi_ifindex(vrf_id_t vrf_id); -extern int zebra_vxlan_vrf_delete(struct zebra_vrf *); +extern int zebra_vxlan_vrf_delete(struct zebra_vrf *zvrf); extern void zebra_vxlan_print_specific_nh_l3vni(struct vty *vty, vni_t l3vni, struct ipaddr *ip, u_char uj); extern void zebra_vxlan_print_specific_rmac_l3vni(struct vty *vty, vni_t l3vni, @@ -91,10 +91,12 @@ extern void zebra_vxlan_print_vni(struct vty *vty, struct zebra_vrf *zvrf, vni_t vni, u_char use_json); extern void zebra_vxlan_print_vnis(struct vty *vty, struct zebra_vrf *zvrf, u_char use_json); -extern void zebra_vxlan_print_rmacs_l3vni(struct vty*, vni_t, u_char); -extern void zebra_vxlan_print_rmacs_all_l3vni(struct vty*, u_char); -extern void zebra_vxlan_print_nh_l3vni(struct vty*, vni_t, u_char); -extern void zebra_vxlan_print_nh_all_l3vni(struct vty*, u_char); +extern void zebra_vxlan_print_rmacs_l3vni(struct vty *vty, vni_t vni, u_char + use_json); +extern void zebra_vxlan_print_rmacs_all_l3vni(struct vty *vty, u_char use_json); +extern void zebra_vxlan_print_nh_l3vni(struct vty *vty, vni_t vni, u_char + use_json); +extern void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, u_char use_json); extern void zebra_vxlan_print_l3vni(struct vty *vty, vni_t vni, u_char use_json); extern void zebra_vxlan_print_l3vnis(struct vty *vty, @@ -144,8 +146,9 @@ extern int zebra_vxlan_advertise_gw_macip(struct zserv *client, extern int zebra_vxlan_advertise_all_vni(struct zserv *client, u_short length, struct zebra_vrf *zvrf); -extern int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf*, vni_t, char*, - int, int); +extern int zebra_vxlan_process_vrf_vni_cmd(struct zebra_vrf *zvrf, vni_t vni, + char *err, + int err_str_sz, int add); extern void zebra_vxlan_init_tables(struct zebra_vrf *zvrf); extern void zebra_vxlan_close_tables(struct zebra_vrf *); extern void zebra_vxlan_ns_init(struct zebra_ns *zns); diff --git a/zebra/zserv.c b/zebra/zserv.c index b70385f112..7eded89f6d 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1180,7 +1180,8 @@ static int zread_route_add(struct zserv *client, u_short length, ifindex); /* if this an EVPN route entry, - program the nh as neigh */ + program the nh as neigh + */ if (CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) { SET_FLAG(nexthop->flags, -- 2.39.5