mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-01 12:47:16 +00:00
fix coding style
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
parent
57f7feb64f
commit
0291c246db
@ -1400,12 +1400,12 @@ static int install_uninstall_routes_for_vni(struct bgp *bgp,
|
||||
bgp_evpn_route_type rtype,
|
||||
int install)
|
||||
{
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct bgp_node *rd_rn, *rn;
|
||||
struct bgp_table *table;
|
||||
struct bgp_info *ri;
|
||||
int ret;
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct bgp_node *rd_rn, *rn;
|
||||
struct bgp_table *table;
|
||||
struct bgp_info *ri;
|
||||
int ret;
|
||||
|
||||
afi = AFI_L2VPN;
|
||||
safi = SAFI_EVPN;
|
||||
@ -2639,11 +2639,11 @@ int bgp_evpn_unimport_route(struct bgp *bgp, afi_t afi, safi_t safi,
|
||||
/* filter routes which have martian next hops */
|
||||
int bgp_filter_evpn_routes_upon_martian_nh_change(struct bgp *bgp)
|
||||
{
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct bgp_node *rd_rn, *rn;
|
||||
struct bgp_table *table;
|
||||
struct bgp_info *ri;
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct bgp_node *rd_rn, *rn;
|
||||
struct bgp_table *table;
|
||||
struct bgp_info *ri;
|
||||
|
||||
afi = AFI_L2VPN;
|
||||
safi = SAFI_EVPN;
|
||||
|
||||
@ -2505,16 +2505,16 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd_macip,
|
||||
"IP address (IPv4 or IPv6)\n"
|
||||
JSON_STR)
|
||||
{
|
||||
struct bgp *bgp;
|
||||
int ret;
|
||||
struct prefix_rd prd;
|
||||
struct ethaddr mac;
|
||||
struct ipaddr ip;
|
||||
int rd_idx = 0;
|
||||
int mac_idx = 0;
|
||||
int ip_idx = 0;
|
||||
int uj = 0;
|
||||
json_object *json = NULL;
|
||||
struct bgp *bgp;
|
||||
int ret;
|
||||
struct prefix_rd prd;
|
||||
struct ethaddr mac;
|
||||
struct ipaddr ip;
|
||||
int rd_idx = 0;
|
||||
int mac_idx = 0;
|
||||
int ip_idx = 0;
|
||||
int uj = 0;
|
||||
json_object *json = NULL;
|
||||
|
||||
memset(&mac, 0, sizeof(struct ethaddr));
|
||||
memset(&ip, 0, sizeof(struct ipaddr));
|
||||
|
||||
@ -90,8 +90,8 @@ static void bgp_nexthop_cache_reset(struct bgp_table *table)
|
||||
|
||||
static void *bgp_tip_hash_alloc(void *p)
|
||||
{
|
||||
const struct in_addr *val = (const struct in_addr *)p;
|
||||
struct tip_addr *addr;
|
||||
const struct in_addr *val = (const struct in_addr *)p;
|
||||
struct tip_addr *addr;
|
||||
|
||||
addr = XMALLOC(MTYPE_TIP_ADDR, sizeof(struct tip_addr));
|
||||
addr->refcnt = 0;
|
||||
@ -107,15 +107,15 @@ static void bgp_tip_hash_free(void *addr)
|
||||
|
||||
static unsigned int bgp_tip_hash_key_make(void *p)
|
||||
{
|
||||
const struct tip_addr *addr = p;
|
||||
const struct tip_addr *addr = p;
|
||||
|
||||
return jhash_1word(addr->addr.s_addr, 0);
|
||||
}
|
||||
|
||||
static int bgp_tip_hash_cmp(const void *p1, const void *p2)
|
||||
{
|
||||
const struct tip_addr *addr1 = p1;
|
||||
const struct tip_addr *addr2 = p2;
|
||||
const struct tip_addr *addr1 = p1;
|
||||
const struct tip_addr *addr2 = p2;
|
||||
|
||||
return addr1->addr.s_addr == addr2->addr.s_addr;
|
||||
}
|
||||
@ -137,8 +137,8 @@ void bgp_tip_hash_destroy(struct bgp *bgp)
|
||||
|
||||
void bgp_tip_add(struct bgp *bgp, struct in_addr *tip)
|
||||
{
|
||||
struct tip_addr tmp;
|
||||
struct tip_addr *addr;
|
||||
struct tip_addr tmp;
|
||||
struct tip_addr *addr;
|
||||
|
||||
tmp.addr = *tip;
|
||||
|
||||
@ -151,8 +151,8 @@ void bgp_tip_add(struct bgp *bgp, struct in_addr *tip)
|
||||
|
||||
void bgp_tip_del(struct bgp *bgp, struct in_addr *tip)
|
||||
{
|
||||
struct tip_addr tmp;
|
||||
struct tip_addr *addr;
|
||||
struct tip_addr tmp;
|
||||
struct tip_addr *addr;
|
||||
|
||||
tmp.addr = *tip;
|
||||
|
||||
|
||||
@ -8358,7 +8358,7 @@ void route_vty_out_detail_header(struct vty *vty, struct bgp *bgp,
|
||||
#if defined(HAVE_CUMULUS)
|
||||
char buf3[EVPN_ROUTE_STRLEN];
|
||||
#endif
|
||||
char prefix_str[BUFSIZ];
|
||||
char prefix_str[BUFSIZ];
|
||||
int count = 0;
|
||||
int best = 0;
|
||||
int suppress = 0;
|
||||
|
||||
@ -6426,7 +6426,7 @@ DEFUN (show_bgp_vrfs,
|
||||
|
||||
static void show_address_entry(struct hash_backet *backet, void *args)
|
||||
{
|
||||
struct vty *vty = (struct vty *) args;
|
||||
struct vty *vty = (struct vty *) args;
|
||||
struct bgp_addr *addr = (struct bgp_addr *) backet->data;
|
||||
|
||||
vty_out(vty, "addr: %s, count: %d\n",
|
||||
@ -6436,7 +6436,7 @@ static void show_address_entry(struct hash_backet *backet, void *args)
|
||||
|
||||
static void show_tip_entry(struct hash_backet *backet, void *args)
|
||||
{
|
||||
struct vty *vty = (struct vty *)args;
|
||||
struct vty *vty = (struct vty *)args;
|
||||
struct tip_addr *tip = (struct tip_addr *) backet->data;
|
||||
|
||||
vty_out(vty, "addr: %s, count: %d\n",
|
||||
@ -6465,7 +6465,7 @@ DEFUN (show_bgp_martian_nexthop_db,
|
||||
"martian next-hops\n"
|
||||
"martian next-hop database\n")
|
||||
{
|
||||
struct bgp *bgp = NULL;
|
||||
struct bgp *bgp = NULL;
|
||||
|
||||
bgp = bgp_get_default();
|
||||
if (!bgp) {
|
||||
@ -7396,14 +7396,14 @@ static void bgp_show_peer_afi(struct vty *vty, struct peer *p, afi_t afi,
|
||||
safi_t safi, u_char use_json,
|
||||
json_object *json_neigh)
|
||||
{
|
||||
struct bgp_filter *filter;
|
||||
struct peer_af *paf;
|
||||
char orf_pfx_name[BUFSIZ];
|
||||
int orf_pfx_count;
|
||||
json_object *json_af = NULL;
|
||||
json_object *json_prefA = NULL;
|
||||
json_object *json_prefB = NULL;
|
||||
json_object *json_addr = NULL;
|
||||
struct bgp_filter *filter;
|
||||
struct peer_af *paf;
|
||||
char orf_pfx_name[BUFSIZ];
|
||||
int orf_pfx_count;
|
||||
json_object *json_af = NULL;
|
||||
json_object *json_prefA = NULL;
|
||||
json_object *json_prefB = NULL;
|
||||
json_object *json_addr = NULL;
|
||||
|
||||
if (use_json) {
|
||||
json_addr = json_object_new_object();
|
||||
@ -9780,10 +9780,10 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
|
||||
static void bgp_show_all_instances_neighbors_vty(struct vty *vty,
|
||||
u_char use_json)
|
||||
{
|
||||
struct listnode *node, *nnode;
|
||||
struct bgp *bgp;
|
||||
json_object *json = NULL;
|
||||
int is_first = 1;
|
||||
struct listnode *node, *nnode;
|
||||
struct bgp *bgp;
|
||||
json_object *json = NULL;
|
||||
int is_first = 1;
|
||||
|
||||
if (use_json)
|
||||
vty_out(vty, "{\n");
|
||||
|
||||
@ -2107,10 +2107,10 @@ static void bgp_zebra_connected(struct zclient *zclient)
|
||||
static int bgp_zebra_process_local_vni(int command, struct zclient *zclient,
|
||||
zebra_size_t length, vrf_id_t vrf_id)
|
||||
{
|
||||
struct stream *s;
|
||||
vni_t vni;
|
||||
struct bgp *bgp;
|
||||
struct in_addr vtep_ip;
|
||||
struct stream *s;
|
||||
vni_t vni;
|
||||
struct bgp *bgp;
|
||||
struct in_addr vtep_ip;
|
||||
|
||||
s = zclient->ibuf;
|
||||
vni = stream_getl(s);
|
||||
|
||||
@ -2735,10 +2735,10 @@ static int bgp_startup_timer_expire(struct thread *thread)
|
||||
static struct bgp *bgp_create(as_t *as, const char *name,
|
||||
enum bgp_instance_type inst_type)
|
||||
{
|
||||
struct bgp *bgp;
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct utsname names;
|
||||
struct bgp *bgp;
|
||||
afi_t afi;
|
||||
safi_t safi;
|
||||
struct utsname names;
|
||||
|
||||
uname(&names);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user