mirror of
https://passt.top/passt
synced 2025-06-20 05:55:33 +02:00
log tcp socket error
This commit is contained in:
parent
65cca54be8
commit
13e7805170
1 changed files with 9 additions and 0 deletions
9
tcp.c
9
tcp.c
|
@ -2333,6 +2333,15 @@ void tcp_sock_handler(const struct ctx *c, union epoll_ref ref,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (events & EPOLLERR) {
|
if (events & EPOLLERR) {
|
||||||
|
int err;
|
||||||
|
socklen_t sl = sizeof(err);
|
||||||
|
|
||||||
|
if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR, &err, &sl))
|
||||||
|
flow_dbg(conn, "Error getting SO_ERROR: %s",
|
||||||
|
strerror_(errno));
|
||||||
|
else
|
||||||
|
flow_dbg(conn, "Resetting due to socket error: %s",
|
||||||
|
strerror_(err));
|
||||||
tcp_rst(c, conn);
|
tcp_rst(c, conn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue