87 Commits

Author SHA1 Message Date
ftasnetamot
109052fdc7 Updated PR as discussion in issue 468 , currently ony for testing 2024-09-08 16:56:50 +02:00
Yves Rutschle
1799a81079 fix off-by-one error that would sometime ignore the latest connection 2024-03-31 22:18:58 +02:00
Yves Rutschle
eec2446723 fix error messages 2023-05-13 22:57:08 +02:00
Yves Rűtschlé
02573eb44b only process write events if file descriptor has not been tidied (may fix #355) 2022-11-03 17:23:49 +01:00
Toni Uhlig
a1db2e8a92
Fixes unitialised memory access as seen in issue #355.
==1391== Conditional jump or move depends on uninitialised value(s)
==1391==    at 0x10E92F: watchers_add_read (sslh-select.c:67)
==1391==    by 0x10E92F: watchers_init (sslh-select.c:59)
==1391==    by 0x10E92F: main_loop (sslh-select.c:134)
==1391==    by 0x10DB6D: main (sslh-main.c:285)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-09-22 11:47:03 +02:00
Toni Uhlig
8d124e1085
changed select(nfds, ...) to select(nfds + 1, ...), see man 3 select
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-08-13 23:40:46 +02:00
yrutschle
83478818df update comment to mention sslh-ev 2022-05-22 22:33:27 +02:00
yrutschle
750e828d49 reinstate checking of FD_SETSIZE for sslh-select 2022-05-22 22:32:22 +02:00
yrutschle
f6fe735171 sort target protocols as TCP or UDP, so only appropriate probes are called by the listeners 2022-05-05 17:45:40 +02:00
yrutschle
7228c0ebc3 refactor: move TCP code to new object tcp-listener 2022-05-03 17:03:30 +02:00
yrutschle
c78a50c1d7 remove obsolete code 2022-04-27 17:33:36 +02:00
yrutschle
9ce9b5cd82 Integrate hash for UDP 2022-04-02 18:48:24 +02:00
yrutschle
207d482189 refactor: move udp timeout management to udp module 2021-11-09 18:27:52 +01:00
yrutschle
d4d9dbb8e7 remove dependancy to watcher type in UDP timeout 2021-11-09 18:12:02 +01:00
yrutschle
a80e2ceb27 remove obsolete declaration 2021-11-07 13:13:41 +01:00
yrutschle
4cd3ab8958 moved watcher add to watcher init 2021-10-28 15:41:09 +02:00
yrutschle
ec033efbbc refactor more code from sslh-select to processes.c 2021-10-26 21:45:44 +02:00
yrutschle
3389000ff3 move action processing to its own file 2021-10-17 16:02:49 +02:00
yrutschle
25abd765cb refactor: abstract watchers from loop data 2021-10-11 22:40:46 +02:00
yrutschle
673c40954e migrate sslh-fork to new log system 2021-09-19 20:29:43 +02:00
yrutschle
f7b6f669a4 sslh-select to use new log system 2021-09-19 20:24:46 +02:00
yrutschle
dbad46a358 remove obsolete debug code 2021-09-19 15:19:37 +02:00
yrutschle
1a3341c2a4 be more defensive when allocating and extending gap 2021-08-24 20:07:28 +02:00
yrutschle
fa848f2ae9 do not timeout TCP connections (fix #300) 2021-08-24 13:38:18 +02:00
yrutschle
40da147efd keep track of next UDP timeout to only go through all connections when that happens 2021-08-06 22:29:00 +02:00
yrutschle
e4936454c5 refactor: take time only once when computing UPD timeouts 2021-08-05 17:05:08 +02:00
yrutschle
7fb65ad0ac refactor: remove sideeffects from udp_timedout 2021-07-18 21:50:40 +02:00
yrutschle
c43882c85f refactor: move timeout management to separate function 2021-07-18 21:36:46 +02:00
yrutschle
e7df8eeaa1 removed static known_source arrays, UDP connections are now managed dynamically 2021-07-07 19:58:08 +02:00
yrutschle
862e33cfec moved UDP support from sslh-fork to sslh-select 2021-07-01 22:44:35 +02:00
yrutschle
1ad450a444 sslh-select sets O_NONBLOCK *before* calling connect, which prevents hanging on an unresposive server (fix #258) 2021-05-28 13:38:45 +02:00
yrutschle
4c570e8d57 remove some debug messages 2021-04-21 08:48:31 +02:00
yrutschle
0a00220b42 justify use of select 2021-04-21 08:43:21 +02:00
yrutschle
b258b0e0f7 manage probing sockets in a specific list instead of searching through all connections 2021-04-19 09:38:22 +02:00
yrutschle
41a914b350 alloc_cnx returns cnx pointer instead of simple error code 2021-04-17 21:29:38 +02:00
yrutschle
dfa5d3cedb simplified some redundant parameters 2021-04-17 17:53:45 +02:00
yrutschle
de474e1d07 stop managing connections as array; instead, allocate connections, and fd2cnx is the only pointer to it 2021-04-14 23:26:01 +02:00
yrutschle
7485afe397 refactor accept to its own function 2021-04-10 08:26:22 +02:00
yrutschle
417722e3c1 remove obsolete definitions 2021-04-03 21:40:53 +02:00
yrutschle
9fca586735 remove over-verboseness 2021-04-03 21:39:43 +02:00
yrutschle
0613d412a2 refactor: write activity checked on select output rather than on each connection object 2021-04-03 21:34:47 +02:00
yrutschle
3edf6a9d22 refactor: move write process to its own function 2021-04-02 22:20:04 +02:00
yrutschle
7a88a50c32 refactor: remove redundant paramters 2021-04-02 16:02:23 +02:00
yrutschle
e7a5bbc4e1 removed some over-verboseness 2021-03-30 20:16:38 +02:00
yrutschle
40557c58ad working version with read activity checked on select output rather than on each connection object 2021-03-29 21:56:21 +02:00
yrutschle
f51781664c add server-side file descriptor to collection 2021-03-28 12:22:36 +02:00
yrutschle
5948270b95 update API 2021-03-28 11:47:33 +02:00
yrutschle
15a5073559 keep track of which connection contains what file descriptor 2021-03-23 22:58:10 +01:00
yrutschle
c2b6bf246c refactor: make collection part of select object 2021-03-23 21:43:07 +01:00
yrutschle
6366d50b89 refactor: use fd_info instead of passing fd_sets directly 2021-03-23 13:59:15 +01:00