tcp: Properly initialise parameters for SO_ACCEPTCONN getsockopt()
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
bd5aaaac7f
commit
8ce188ecb0
1 changed files with 3 additions and 2 deletions
5
tcp.c
5
tcp.c
|
@ -1418,18 +1418,19 @@ static void tcp_connect_finish(struct ctx *c, int s)
|
|||
void tcp_sock_handler(struct ctx *c, int s, uint32_t events, char *pkt_buf,
|
||||
struct timespec *now)
|
||||
{
|
||||
int accept = -1;
|
||||
socklen_t sl;
|
||||
int accept;
|
||||
|
||||
(void)pkt_buf;
|
||||
|
||||
sl = sizeof(accept);
|
||||
|
||||
if (tc[s].s == LAST_ACK) {
|
||||
tcp_send_to_tap(c, s, ACK, NULL, 0);
|
||||
tcp_close_and_epoll_del(c, s);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (tc[s].s == SOCK_SYN_SENT) {
|
||||
/* This can only be a socket error or a shutdown from remote */
|
||||
tcp_rst(c, s);
|
||||
|
|
Loading…
Reference in a new issue