This is a patch for the null-packet denial of service attack for Linux. While you can add an IP-Table entry to mitigate such attacks, this is unfortunately not an option for people who do not have root access to their servers.

If you can upload files, you can now defend yourself as well. Simply drop patch.so into sys/lua/patch.so and add the following line into server.lua

  require "sys.lua.patch"

Afterwards, you should see the following text when you restart your server

  Checking server integrity: 9cbfca47... 
  Null-packet protection initialized successfully!

If this check fails, make sure that you are running the LINUX version of the CS2D 1.0.0.1 DEDICATED server as found on https://usgn.de/

For those who are security minded and do not trust arbitrary .so libraries to run on their system, I applaud you. I have also included the full source-code within patch.c, and have included a Makefile so you can audit the source-code to your satisfaction and then build your own version of the null-packet shield. Just run

  make

and 

  make -B server.lua

will automatically add the `require` call into server.lua

Lee
