##############################################################################
#                           ServerCrashFix v1.1                              #
#                               by AnthraX                                   #
##############################################################################

1) What is it?
--------------

ServerCrashFix is a mod that will protect your server against servercrash/DoS
exploits that were released after the latest UTPG patch (v451).

In particular it will protect you against these exploits:
* Malformed String Exploits
* Fake Player DoS
* Malformed Join Request DoS

Whenever a player attempts to crash the server, ServerCrashFix will temporarily
blacklist the player's ip so all further requests from that IP will be ignored
until the end of the map.

ServerCrashFix replaces the earlier patches implemented in AnthChecker v1.38.
When ServerCrashFix is installed on a server with AC v1.38, it will disable AC's
patches and use it's own.

ServerCrashFix works on both Linux servers and Windows servers although some
Linux admins might have to update their server's Core.so file with the one
included in the LinuxFix folder of this package.

New features since ServerCrashFix v1.1:

* Exec fix: fixes crashes caused by mods that execute "get Engine.GameEngine
ServerPackages" or "get Engine.GameEngine ServerActors" consolecommands
heavily modded servers. These crashes usually happen during server startup.
Mods that are affected by these problems include AnthChecker, IpToCountry,
NexGen, ASC, ...

* Malloc fix: makes the UEngine memory manager thread-safe. This fixes
seemingly random crashes (although they usually happen during server startup)
on servers that use multiple threads. One case in which a server uses multiple
threads is when it's resolving hostnames (eg for the masterserver uplinks or
irc reporterbots)

* Crashlog fix: this is a linux-only fix that installs custom signal handlers.
These custom signal handlers will output a lot of useful information into the
serverlog when the server terminates unexpectedly

* Tickrate fix: this is not a crashfix but rather a stability fix. This fix
has different functionality on Windows and Linux. 

On windows this fix can:
    - Request a high resolution timer, this will stabilise the tickrate
    - Replace the appSeconds() function by a multicore safe function
    
On linux this fix can:
    - Switch the default timing method from appSeconds() to appSecondsSlow()
    On some servers the latter can return more accurate timing information.

* Affinity fix: This fix can force the server process to run on one specific
CPU Core. This can stabilise the tickrate on multicore servers.
Do not use this fix if you run a windows server with the timing fix enabled!

2) Installation
---------------

To install ServerCrashFix on your server:

1. Unzip the contents of this zip package in your server's system folder. 

2. Open your server's unrealtournament.ini file and find the line that reads "[Engine.GameEngine]".

3. Add these lines under it:

ServerActors=ServerCrashFix_v11.SCFActor  

Don't forget to uninstall previous versions of ServerCrashFix!
    
4. Restart your server

3) Settings
-----------

ServerCrashFix comes with an ini file in which you can modify the following
settings:

[ServerCrashFix_v11.SCFActor]
bEnabled=true
bFixNetDriver=true
bFixExec=true
bFixMalloc=true
bFixHandlers=true
bFixAffinity=false
CPUAffinity=0
bFixTimer=false
bFixTickRate=false
bForceUnhook=false

* bEnabled: set to false to disable ServerCrashFix completely

* bFixNetDriver: when set to true your server will be protected against remote
servercrashing tools

* bFixExec: when set to true your server will not crash when it's heavily
modded and you run one of the mods that performs "GET Engine.GameEngine ..."
consolecommands

* bFixMalloc: when set to true your server will deal with multiple threads
correctly

* bFixHandlers: when set to true and your server is linux based this will
install custom signal handlers that provide better info when the server crashes
If you run windows this fix doesn't do anything

* bFixAffinity: when set to true the cpu affinity of your server process is
forced

* CPUAffinity: the CPU your server process should run on (if bFixAffinity is
set to true). 0 means the first core, 1 means the second and so on.

* bFixTimer: when set to true and your server is windows based this will
request a high resolution timer which will stabilise the tickrate.
On linux this fix doesn't do anything

* bFixTickrate: on windows this fix will switch the timing method from RDTSC
to timeGetTime (the latter is multicore safe). On linux this will switch
the timing method from RDTSC to gettimeofday (the latter MIGHT work better on
some systems)

* bForceUnhook: should SCF always unhook the Exec and DLO functions during
mapswitches? In theory it is better when this is set to true but unfortunately
setting this to true causes crashes during mapswitches when certain mods are
installed (eg: NexgenX).
 
4) History
----------
 
v1.1:
    * Several new fixes added
    
v1.0 (Public) :
    * First public release

5) Thanks to
------------
 
- Shambler : For help with the native code

 
6) Feedback & Support
---------------------

http://www.unrealadmin.org/forums/forumdisplay.php?f=176
 