1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00
Commit Graph

31 Commits

Author SHA1 Message Date
Philipp Schafft
86635ee700 Fix: Avoid breaking windows port
Windows understands FD_SETSIZE as POSIX does but unlike Linux (and likely
*BSD) does. While Linux uses the value to mark the highest value of a
filehandle, Windows understands it as the number of handles.
2023-06-11 20:10:04 +00:00
Philipp Schafft
206c66d4b2 Update: Workaround for unsafe select(2)
When select(2) is used we only support as many file handles as
there is space in fd_set. The limit is given in FD_SETSIZE.
Once we use filehandles with an value >= FD_SETSIZE we might
end up corrupting memory. Therefore we try to avoid those calls
by rejecting handles >= FD_SETSIZE very early.

This patch should keep most problems away. However it does not
actually ensure we don't corrupt memory. That check has been skipped
for performance reasons. Keeping in mind that the use of select(2)
is already deprecated.
2023-02-21 14:31:10 +00:00
Philipp Schafft
b06942e1bc Feature: Use settings from the listen socket for YP if there is only one
Closes: #2354
2022-03-21 23:13:30 +00:00
Philipp Schafft
efbb64e618 Update: Replaced listensocket container's mutex with rwlock 2022-03-21 08:48:23 +00:00
Philipp Schafft
42a9d82926 Fix: Typo 2022-03-12 10:04:19 +00:00
Philipp Schafft
b9a16b92f0 Update: Improved debug logging for connection and socket handling 2022-03-11 12:45:48 +00:00
Philipp Schafft
661f736415 Update: Prefer to bind to IPv6 if we have IPv4-mapped support 2022-03-11 12:40:15 +00:00
Philipp Schafft
81e965a08f Feature: Warn on dashboard if IPv6 is not enabled 2022-03-11 12:40:04 +00:00
Philipp Schafft
567b51420f Feature: Support listing listen socket on web interface 2022-03-11 12:39:57 +00:00
Philipp Schafft
80972517da Feature: Support asking a listen socket for it's family 2022-03-11 12:39:51 +00:00
Philipp Schafft
4cf821d592 Feature: Added database functions to find name of listener_type_t, and tlsmode_t 2022-03-11 12:39:37 +00:00
Philipp Schafft
dcdd96c000 Update: Make listensocket_container_get_by_id() public 2020-04-22 19:35:35 +00:00
Philipp Schafft
2ffaa92ea6 Fix: Fixed two double-unlock errors 2020-02-14 14:05:01 +00:00
Philipp Schafft
1b94dea420 Update: Improved connecting-the-dots regarding clients and object IDs 2019-06-26 08:23:29 +00:00
Philipp Schafft
fea817da2d Update: Replaced listensocket_container_new() 2018-10-10 15:06:45 +00:00
Philipp Schafft
f1b2785fc4 Feature: Changed refobject subsystem to use defined types 2018-10-10 11:15:39 +00:00
Philipp Schafft
de6e8b4197 Feature: Added support to set listen(2) backlog.
Closes: #2225
2018-09-28 13:52:39 +00:00
Philipp Schafft
03092d1049 Fix: Do not asume listener->id != NULL when looking for a listener with a specific ID 2018-08-08 09:04:55 +00:00
Marvin Scholz
db95e9c6fc Fix: Guard include of <sys/select.h> 2018-07-09 03:35:15 +02:00
Philipp Schafft
80ffdca7d1 Feature: Allow listen sockets to virtually handle other sockets traffic.
This adds on-behalf-of="#id" to <listen-socket>. It allows a socket
to handle the traffic that was originally meant of another (virtual)
listen socket.
2018-06-30 13:51:42 +00:00
Philipp Schafft
33588fc9cf Update: Prepare listensocket_*() API for uses with real listen socket != effective listen socket 2018-06-30 13:10:09 +00:00
Philipp Schafft
58848cbe56 Feature: Allow listen sockets to be of type "virtual" 2018-06-30 13:10:09 +00:00
Philipp Schafft
ab8d1639ba Update: Made listensocket_* perfect thread safe. 2018-06-30 13:10:08 +00:00
Philipp Schafft
fcef3f12d6 Feature: Allow complete reconfiguration of sockets on config reload 2018-06-30 13:10:08 +00:00
Philipp Schafft
b495a407f9 Feature: Added listensocket_container_configure_and_setup() that combines configure and setup into one call 2018-06-30 13:10:08 +00:00
Philipp Schafft
a6ff1cb2d7 Update: Moved compare of two listeners into __listener_cmp() 2018-06-30 13:10:08 +00:00
Philipp Schafft
e661e14bee Moved config apply on listensocket objects into it's own function 2018-06-30 13:10:08 +00:00
Philipp Schafft
6054f5cce4 Cleanup: Mark static function as inline 2018-06-30 13:10:08 +00:00
Philipp Schafft
8848d74e58 Fix: Correctly detect error condition 2018-06-30 13:10:08 +00:00
Philipp Schafft
c401bbcc12 Feature: Added listensocket_container_set_sockcount_cb() and listensocket_container_sockcount() 2018-06-30 13:10:08 +00:00
Philipp Schafft
5490120d4d Update: Rewrote listen socket handling code comepletly.
This moves all the listen socket code into a nice and abstracting file.

Notes:
* Altering listen socket setup does not yet work on config reload.
  (Did it ever work?)
* Server will start with no listen sockets. (There are unconfirmed
  rumours it sometimes(?) did before.) This is to be re-implemented
  in another commit. It can also be improved to work allow checking
  on reload or other config changes.
* For slave connections the server address is now checked against
  the allow/deny-IP list.
2018-06-30 13:10:08 +00:00