From 9df2b997b975c7a7807e9e491989d5123d87458f Mon Sep 17 00:00:00 2001 From: vivek Date: Mon, 20 Aug 2018 21:31:30 +0000 Subject: [PATCH] bgpd, zebra: Fix warnings Signed-off-by: Vivek Venkatraman --- bgpd/bgp_evpn.c | 5 +++-- zebra/zebra_vxlan.c | 23 ++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 78c611ef99..fee2e89f8b 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1564,7 +1564,7 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf, struct prefix_evpn *evp, static int update_evpn_route_entry(struct bgp *bgp, struct bgpevpn *vpn, afi_t afi, safi_t safi, struct bgp_node *rn, struct attr *attr, int add, - struct bgp_info **ri, u_char flags, + struct bgp_info **ri, uint8_t flags, uint32_t seq) { struct bgp_info *tmp_ri; @@ -1996,7 +1996,8 @@ static int update_all_type2_routes(struct bgp *bgp, struct bgpevpn *vpn) * using L3 VNI for type-2 routes also. */ if ((is_evpn_prefix_ipaddr_v4(evp) || - !IN6_IS_ADDR_LINKLOCAL(&evp->prefix.macip_addr.ip.ipaddr_v6)) && + !IN6_IS_ADDR_LINKLOCAL( + &evp->prefix.macip_addr.ip.ipaddr_v6)) && CHECK_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS) && bgpevpn_get_l3vni(vpn)) add_l3_ecomm = 1; diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 65583ed190..79c2bb03e6 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2065,8 +2065,9 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni, ETH_ALEN) != 0) { old_zmac = zvni_mac_lookup(zvni, &n->emac); if (old_zmac) { - old_mac_seq = CHECK_FLAG(old_zmac->flags, - ZEBRA_MAC_REMOTE) ? + old_mac_seq = CHECK_FLAG( + old_zmac->flags, + ZEBRA_MAC_REMOTE) ? old_zmac->rem_seq : old_zmac->loc_seq; neigh_mac_change = upd_mac_seq = true; @@ -2129,8 +2130,8 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni, zmac->flags, zmac->loc_seq)) return -1; zvni_process_neigh_on_local_mac_change(zvni, zmac, 1); - return 0; - } + return 0; + } ZEBRA_NEIGH_SET_ACTIVE(n); n->loc_seq = zmac->loc_seq; @@ -4004,9 +4005,9 @@ static int zebra_vxlan_readd_remote_rmac(zebra_l3vni_t *zl3vni, /* Process a remote MACIP add from BGP. */ static void process_remote_macip_add(vni_t vni, struct ethaddr *macaddr, - u_short ipa_len, + uint16_t ipa_len, struct ipaddr *ipaddr, - u_char flags, + uint8_t flags, uint32_t seq, struct in_addr vtep_ip) { @@ -4020,7 +4021,7 @@ static void process_remote_macip_add(vni_t vni, struct interface *ifp = NULL; struct zebra_if *zif = NULL; uint32_t tmp_seq; - u_char sticky = 0; + uint8_t sticky = 0; u_char remote_gw = 0; /* Locate VNI hash entry - expected to exist. */ @@ -4269,7 +4270,7 @@ static void process_remote_macip_add(vni_t vni, /* Process a remote MACIP delete from BGP. */ static void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr, - u_short ipa_len, + uint16_t ipa_len, struct ipaddr *ipaddr, struct in_addr vtep_ip) { @@ -4695,7 +4696,6 @@ void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, uint8_t use_json) json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } - return; } /* @@ -4754,6 +4754,7 @@ void zebra_vxlan_print_vrf_vni(struct vty *vty, struct zebra_vrf *zvrf, zl3vni_rmac2str(zl3vni, buf, sizeof(buf))); } else { json_object *json_vrf = NULL; + json_vrf = json_object_new_object(); json_object_string_add(json_vrf, "vrf", zvrf_name(zvrf)); json_object_int_add(json_vrf, "vni", zl3vni->vni); @@ -5408,7 +5409,7 @@ void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS) struct ethaddr macaddr; struct ipaddr ip; struct in_addr vtep_ip; - unsigned short l = 0, ipa_len; + uint16_t l = 0, ipa_len; char buf[ETHER_ADDR_STRLEN]; char buf1[INET6_ADDRSTRLEN]; @@ -5467,7 +5468,7 @@ void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS) struct ethaddr macaddr; struct ipaddr ip; struct in_addr vtep_ip; - unsigned short l = 0, ipa_len; + uint16_t l = 0, ipa_len; uint8_t flags = 0; uint32_t seq; char buf[ETHER_ADDR_STRLEN]; -- 2.39.5