-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Possible SYN flooding #549
Comments
Hi, I accounted same issues while upgrading Linux kernel in embedded system from 4.0 to 4.4. Still looking for solution or any possible workaround. |
Hi, I have same problem after upgrading kernel from 4.0 to 4.4. Is there any workaround for that? |
I switched over to https://github.com/eidheim/Simple-WebSocket-Server, which is also boost-based => apparently not a boost related issue... |
what is the best way to reproduce this? |
hard to say... As zweleb mentioned, it happened after a kernel upgrade. |
okay. is it something that happens consistently or will I need to throw a diverse/fuzzed workload at it? |
In my case, it happened consistently, on every connection. |
I have Linux 4.4.0-xilinx #1 SMP PREEMPT Wed May 18 15:46:50 CEST 2016 armv7l GNU/Linux and each time I start this I see in dmesg
Btw: |
Hi all, thanks to some hardware provided by @na1pir I was able to figure out what the likely issue was here. Specifically, WebSocket++ previously used a value of 0 as the default listen queue backlog depth. The behavior of this value on most systems was to use the OS default queue depth. Certain OSes post Linux kernel 4.4 appear to treat this value differently, rejecting all connections instead. I've updated the library (develop branch) to use the Asio default of For those using previous versions of the library a workaround is to use the If anyone else can try this and confirm the fix that would be helpful. |
Thanks @zaphoyd. I would tag this issue as resolved as soon as someone test this patch on x86 and/or x86_64 and confirms this it is universal for more then one architecture. |
Experiencing the same symptoms on Ubuntu 16.04.1 LTS, kernel 4.4.0-36, x86_64. Client connections time out, and kern.log shows SYN flooding warnings like this:
|
So I had this problem with Librevault and websocketpp 0.7.0. |
I have experienced same issue on a machine (Ubuntu 16.04, Kernel 4.4.0-38-generic,
Even if I disabled
The issue has been resolved when I use However, there was no issue on other similar machine (Ubuntu 16.04, Kernel 4.4.0-38-generic) which never used |
Sounds like this is fixed, will include in 0.8.0 |
@kwonoh As far as I can tell, the reason that If you are running someone else's prebuilt binary (my use-case) and can't change the code to make a call to |
…ixes zaphoyd#549 After a change in Linux Kernel 4.4 the value of 0 causes all connections to be rejected rather than the default value being used. The default is now the asio::socket_base::max_connections value instead (which is the default asio uses when no value is provided). Documentation has been updated accordingly. (Resolved conflicts on changelog.md while cherry-picking from upstream.)
Work on #245 Related to zaphoyd/websocketpp#549 Change default listen backlog from 0 to boost::asio::socket_base::max_connections. Also, we'll take on the opportunity and add a configuration parameter for this value, in the file kurento.conf.json.
…ixes zaphoyd#549 After a change in Linux Kernel 4.4 the value of 0 causes all connections to be rejected rather than the default value being used. The default is now the asio::socket_base::max_connections value instead (which is the default asio uses when no value is provided). Documentation has been updated accordingly.
Hi,
I had an websocketpp server running for about a year now (only occasionally on a local linux machine for integration test of another system, so only one concurrent connection), but suddenly it stopped working: Clients cannot connect anymore (they timeout).
in dmesg i get the following error:
request_sock_TCP: Possible SYN flooding on port 9002. Dropping request. Check SNMP counters.
But there's only one connection, so it definetely cannot be "real" SYN flooding.
I tried it also with the echo_server and echo_client example => same problem.
I tried fiddling around with the "syn" options in /etc/sysctl.conf (enabling, disabling, changing memory), => no effect.
I also used debug_asio_no_tls => does not give any output on connection attempts.
However, it can't be my system all alone, when trying to set up a node js based websocket server, it works flawlessly.
Any ideas what might be the problem (as it is not a productive environment, workarounds are also highly appreciated)?
The text was updated successfully, but these errors were encountered: