diff options
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r-- | bgpd/bgp_network.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 3fb7619ed..0c325b678 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -342,7 +342,7 @@ static void bgp_socket_set_buffer_size(const int fd) } /* Accept bgp connection. */ -static int bgp_accept(struct thread *thread) +static void bgp_accept(struct thread *thread) { int bgp_sock; int accept_sock; @@ -363,7 +363,7 @@ static int bgp_accept(struct thread *thread) 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, @@ -402,7 +402,7 @@ static int bgp_accept(struct thread *thread) "[Error] BGP socket accept failed (%s); retrying", safe_strerror(save_errno)); } - return -1; + return; } set_nonblocking(bgp_sock); @@ -418,7 +418,7 @@ static int bgp_accept(struct thread *thread) "[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); @@ -451,7 +451,7 @@ static int bgp_accept(struct thread *thread) TCP_connection_open); } - return 0; + return; } } @@ -463,7 +463,7 @@ static int bgp_accept(struct thread *thread) VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id))); } close(bgp_sock); - return -1; + return; } if (CHECK_FLAG(peer1->flags, PEER_FLAG_SHUTDOWN) @@ -474,7 +474,7 @@ static int bgp_accept(struct thread *thread) inet_sutop(&su, buf), bgp->name_pretty, bgp->as, VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id))); close(bgp_sock); - return -1; + return; } /* @@ -489,7 +489,7 @@ static int bgp_accept(struct thread *thread) "[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. */ @@ -499,7 +499,7 @@ static int bgp_accept(struct thread *thread) "%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 @@ -512,7 +512,7 @@ static int bgp_accept(struct thread *thread) "[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)) @@ -600,8 +600,6 @@ static int bgp_accept(struct thread *thread) * massage the event system to make things happy */ bgp_nht_interface_events(peer); - - return 0; } /* BGP socket bind. */ |