mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
check udp timeouts on all new connections including TCP
This commit is contained in:
1 parent
b57b333a39
commit
81e2d0e2f4
3 files changed
+3
-2
No files matched your search
@@ -99,6 +99,8 @@ struct connection* cnx_accept_process(struct loop_info* fd_info, struct listen_e
|
||||
int type = listen_socket->type;
|
||||
struct connection* cnx;
|
||||
|
||||
udp_timeouts(fd_info);
|
||||
|
||||
switch (type) {
|
||||
case SOCK_STREAM:
|
||||
cnx = accept_new_connection(listen_socket, fd_info);
|
||||
|
||||
@@ -271,8 +271,6 @@ struct connection* udp_c2s_forward(int sockfd, struct loop_info* fd_info)
|
||||
malloc/free overhead for each packet, when really 64K is not that much */
|
||||
|
||||
|
||||
udp_timeouts(fd_info);
|
||||
|
||||
addrlen = sizeof(src_addr);
|
||||
len = recvfrom(sockfd, data, sizeof(data), 0, (struct sockaddr*) &src_addr, &addrlen);
|
||||
if (len < 0) {
|
||||
|
||||
@@ -25,5 +25,6 @@ void udp_s2c_forward(struct connection* cnx);
|
||||
|
||||
void udp_init(struct loop_info* fd_info);
|
||||
void udp_tidy(struct connection* cnx, struct loop_info* fd_info);
|
||||
void udp_timeouts(struct loop_info* fd_info);
|
||||
|
||||
#endif /* UDPLISTENER_H */
|
||||
Reference in new issue
Block a user