APF Firewall wont start on Ubuntu 11.10, Kernel 3.x

I recently setup an 64bit Ubuntu 11.10 install over at 6Sync for some development projects.  While it will probably not end up hosting anything of real importance and will be recycled shortly I figured it would still be a good idea to put a firewall on it to help aid in protecting it from bored script kiddies.
I have used APF many times in the past so that was the logical choice as I knew how to get it setup and running exactly as needed. Ubuntu provides a package for it so I ran an apt-get install… It installed fine, I then configured the conf.apf to my liking.  I started APF and it started almost instantly, which while my 6Sync VPS is pretty fast it shouldn’t have started nearly that fast. I checked out iptables and it was empty, I decided to have a look at the apf log and saw the following.

Mar 01 21:57:52 node1 apf(12614): {glob} config. or .rule file has changed since last full load, going full load
Mar 01 21:57:52 node1 apf(12614): {glob} activating firewall
Mar 01 21:57:52 node1 apf(12684): {glob} kernel version not equal to 2.4.x or 2.6.x, aborting.
Mar 01 21:57:52 node1 apf(12614): {glob} firewall initialized

I saw that the APF install that was available in apt was outdated, while not by much it was a little behind. I figured I might try to download the newest build directly from their site as it was a bit newer. I removed the installed version, installed the new and it didn’t work either.  After some further searching I came across this bug report.  Per the information on the bug description the person advised editing the following file /etc/apf-firewall/internals/functions.apf and adding this code just after 2.6 check

elif [ "$KREL" == "3.0" ]; then

After adding the code I restarted APF and it took a moment longer to load and then it was up and running.  I took a look at the iptables and all my rules had been implemented.    Thought that I would document it here for future reference as I am not sure if the link to the bug will be removed and it might save someone a few minutes of struggling to get it working.