http://bugs.winehq.org/show_bug.cgi?id=12302
--- Comment #61 from Daniel Santos daniel.santos@pobox.com 2008-07-14 11:01:02 --- I have run into problems using netfilter_queue and have posted this bug: https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=547 . I guess we'll have to look at trying to get this fix integrated into wine.
I propose some mechanism similar to this one:
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Hacks\LOTRO] "Enabled"=dword:00000001 "PacketCacheDuration"=dword:00000055 (85) -- this is milliseconds "PacketCacheSize"=dword:00000100 "PortA"=dword:00002330 (9008) "PortB"=dword:0000232a (9002)
So first, we have a global like this (we can do it in the thread-local data too if there's a good reason to do so): BOOL lotro_hack_enabled;
And in DllMain when we do DLL_PROCESS_ATTACH, we look for HKEY_CURRENT_USER\Software\Wine\Hacks\LOTRO\Enabled and initialize lotro_hack_enabled to it's value, or false if it or any of it's parents are not present. This way, there is a minimal amount of instructions that need to be executed for those who do not have this hack turned on. Even if it is turned on, I've been tweaking out the hack so it's more efficient. I'll try to get something together over the next few days and I'll be contacting AJ (the maintainer) to see if we can work this in. Otherwise, we're looking at having to fix netfilter_queue or add a netfilter module as Mikko proposed -- I would just prefer to stay out of kernelspace if possible.