static char *bgp_get_bound_name(struct peer *peer);
-/* BGP listening socket. */
-struct bgp_listener {
- int fd;
- union sockunion su;
- struct thread *thread;
- struct bgp *bgp;
- char *name;
-};
-
void bgp_dump_listener_info(struct vty *vty)
{
struct listnode *node;
}
/* Accept bgp connection. */
-static int bgp_accept(struct thread *thread)
+static void bgp_accept(struct thread *thread)
{
int bgp_sock;
int accept_sock;
flog_err_sys(EC_LIB_SOCKET,
"[Error] BGP accept socket fd is negative: %d",
accept_sock);
- return -1;
+ return;
}
thread_add_read(bm->master, bgp_accept, listener, accept_sock,
"[Error] BGP socket accept failed (%s); retrying",
safe_strerror(save_errno));
}
- return -1;
+ return;
}
set_nonblocking(bgp_sock);
"[Event] Could not get instance for incoming conn from %s",
inet_sutop(&su, buf));
close(bgp_sock);
- return -1;
+ return;
}
bgp_socket_set_buffer_size(bgp_sock);
TCP_connection_open);
}
- return 0;
+ return;
}
}
VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id)));
}
close(bgp_sock);
- return -1;
+ return;
}
if (CHECK_FLAG(peer1->flags, PEER_FLAG_SHUTDOWN)
inet_sutop(&su, buf), bgp->name_pretty, bgp->as,
VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id)));
close(bgp_sock);
- return -1;
+ return;
}
/*
"[Event] Closing incoming conn for %s (%p) state %d",
peer1->host, peer1, peer1->status);
close(bgp_sock);
- return -1;
+ return;
}
/* Check that at least one AF is activated for the peer. */
"%s - incoming conn rejected - no AF activated for peer",
peer1->host);
close(bgp_sock);
- return -1;
+ return;
}
/* Do not try to reconnect if the peer reached maximum
"[Event] Incoming BGP connection rejected from %s due to maximum-prefix or shutdown",
peer1->host);
close(bgp_sock);
- return -1;
+ return;
}
if (bgp_debug_neighbor_events(peer1))
* massage the event system to make things happy
*/
bgp_nht_interface_events(peer);
-
- return 0;
}
/* BGP socket bind. */