Does this work for GoldSRC based games?
Also, what happens if there are multiple servers with port 27015/27016 on 1 VPS (aka. the VPS has multiple IPs)?
Will the module correctly FW the traffic to the correct IP : Port?
Edit: Tried installing the module on Debian 10.1 (Kernel 4.19.0.6-amd64):
Code:
make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-6-amd64'
CC [M] /home/downloads/poc/poc.o
/home/downloads/poc/poc.c: In function ‘init_module’:
/home/downloads/poc/poc.c:200:2: error: implicit declaration of function ‘nf_register_hook’; did you mean ‘nf_register_net_hook’? [-Werror=implicit-function-declaration]
nf_register_hook(&pre_hook);
^~~~~~~~~~~~~~~~
nf_register_net_hook
/home/downloads/poc/poc.c: In function ‘cleanup_module’:
/home/downloads/poc/poc.c:215:2: error: implicit declaration of function ‘nf_unregister_hook’; did you mean ‘nf_unregister_net_hook’? [-Werror=implicit-function-declaration]
nf_unregister_hook(&pre_hook);
^~~~~~~~~~~~~~~~~~
nf_unregister_net_hook
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-6-common/scripts/Makefile.build:315: /home/downloads/poc/poc.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.19.0-6-common/Makefile:1534: _module_/home/downloads/poc] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-6-amd64'
make: *** [Makefile:8: default] Error 2
Edit2: Ok.. works on debian 9
However, is an update for a newer kernel planned?
However, after some initial testing, there does seem to be issues with server queries from sites such as GameTracker.com. It does tend to show the server as offline and it took me 5-6 attempts to actually add it there. While it is reported as online, it does not show online players.
Edit50: Disabling checksum offload resolved the above.
Edit51:
Is there a way to bind this module on a per IP : Port basis?
I have a VM with 4 IPs and i don't want to run the module on all of them.
Ex. I have servers with 1.1.1.1:27015, 1.1.1.1:27016, 2.2.2.2:27015, 2.2.2.2:27016, 3.3.3.3:27015, 3.3.3.3:27016, etc, and I only need to run it on 3.3.3.3:27015 and 1.1.1.1:27016 (for example).
Another Edit: The SourceQueryCacheMono keeps crashing for me. I tried both with the compiled .exe you provided and compiled it myself, but no luck. Since that is not really working properly, this module becomes unusable :\
Crash error:
Code:
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at QueryCache.MainClass.Main (System.String[] args) [0x003d3] in <33c391ceb45944cfb17c055999dca527>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at QueryCache.MainClass.Main (System.String[] args) [0x003d3] in <33c391ceb45944cfb17c055999dca527>:0