mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
bgpd: compile warnings cleanup
* bgpd/bgp_fsm.c * bgp_clearing_completed(): only used in one file, can be static * bgpd/bgp_packet.c * afi2str(): sayonara * safi2str(): sayonara * bgpd/bgp_route.c * bgp_distance_reset(): sayonara * bgpd/bgp_zebra.c * bgp_ifindex_by_nexthop(): sayonara
This commit is contained in:
parent
cc2dd9280c
commit
9e4ca89c36
@ -427,7 +427,7 @@ bgp_fsm_change_status (struct peer *peer, int status)
|
||||
}
|
||||
|
||||
/* Flush the event queue and ensure the peer is shut down */
|
||||
int
|
||||
static int
|
||||
bgp_clearing_completed (struct peer *peer)
|
||||
{
|
||||
int rc = bgp_stop(peer);
|
||||
|
@ -920,30 +920,6 @@ bgp_notify_send (struct peer *peer, u_char code, u_char sub_code)
|
||||
bgp_notify_send_with_data (peer, code, sub_code, NULL, 0);
|
||||
}
|
||||
|
||||
static const char *
|
||||
afi2str (afi_t afi)
|
||||
{
|
||||
if (afi == AFI_IP)
|
||||
return "AFI_IP";
|
||||
else if (afi == AFI_IP6)
|
||||
return "AFI_IP6";
|
||||
else
|
||||
return "Unknown AFI";
|
||||
}
|
||||
|
||||
static const char *
|
||||
safi2str (safi_t safi)
|
||||
{
|
||||
if (safi == SAFI_UNICAST)
|
||||
return "SAFI_UNICAST";
|
||||
else if (safi == SAFI_MULTICAST)
|
||||
return "SAFI_MULTICAST";
|
||||
else if (safi == SAFI_MPLS_VPN || safi == BGP_SAFI_VPNV4)
|
||||
return "SAFI_MPLS_VPN";
|
||||
else
|
||||
return "Unknown SAFI";
|
||||
}
|
||||
|
||||
/* Send route refresh message to the peer. */
|
||||
void
|
||||
bgp_route_refresh_send (struct peer *peer, afi_t afi, safi_t safi,
|
||||
|
@ -11031,23 +11031,6 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
bgp_distance_reset (void)
|
||||
{
|
||||
struct bgp_node *rn;
|
||||
struct bgp_distance *bdistance;
|
||||
|
||||
for (rn = bgp_table_top (bgp_distance_table); rn; rn = bgp_route_next (rn))
|
||||
if ((bdistance = rn->info) != NULL)
|
||||
{
|
||||
if (bdistance->access_list)
|
||||
free (bdistance->access_list);
|
||||
bgp_distance_free (bdistance);
|
||||
rn->info = NULL;
|
||||
bgp_unlock_node (rn);
|
||||
}
|
||||
}
|
||||
|
||||
/* Apply BGP information to distance method. */
|
||||
u_char
|
||||
bgp_distance_apply (struct prefix *p, struct bgp_info *rinfo, struct bgp *bgp)
|
||||
|
@ -639,39 +639,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
static unsigned int
|
||||
bgp_ifindex_by_nexthop (struct in6_addr *addr)
|
||||
{
|
||||
struct listnode *ifnode;
|
||||
struct listnode *cnode;
|
||||
struct interface *ifp;
|
||||
struct connected *connected;
|
||||
struct prefix_ipv6 p;
|
||||
|
||||
p.family = AF_INET6;
|
||||
p.prefix = *addr;
|
||||
p.prefixlen = IPV6_MAX_BITLEN;
|
||||
|
||||
for (ALL_LIST_ELEMENTS_RO (iflist, ifnode, ifp))
|
||||
{
|
||||
for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, connected))
|
||||
{
|
||||
struct prefix *cp;
|
||||
|
||||
cp = connected->address;
|
||||
|
||||
if (cp->family == AF_INET6)
|
||||
{
|
||||
if (prefix_match (cp, (struct prefix *)&p))
|
||||
return ifp->ifindex;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_IPV6 */
|
||||
|
||||
void
|
||||
bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user