Page 1 of 2
Fix for Linux Loki Checksum bug
Posted: Tue Mar 21, 2006 8:24 am
by Munk
Hi there,
I've written a fix for all those linux users out there who try to use the Loki Descent version.
As you know, most missions will show a \"checksum error\" when trying to enter a server which runs the windows version.
Currenty, about 750 levels are supported, if I missed some, please let me know.
For Mac users, which have to face the same problem with checksums: source code (perl) is in the file. Maybe it runs on Mac in an perl environment also (not tested, just speculation).
Download Checksum update:
http://munk.vex-server.de/d3fix/checksums
(save as /usr/local/share/d3fix/checksums)
Download full:
http://munk.vex-server.de/d3fix/d3fix_1.6-1_i386.deb
http://munk.vex-server.de/d3fix/d3fix-1.6-2.i386.rpm
http://munk.vex-server.de/d3fix/d3fix-1.6.tgz
Installation:
- Download the appropriate package for your distribution (Debian&Ubuntu: .deb, Suse&RedHat: .rpm, others: .tgz)
Then run as root:
\"dpkg -i d3fix_1.6-1_i386.deb\"
or
\"rpm --nodeps -i d3fix-1.6-2.i386.rpm\"
or
\"tar -C / -xvvzf d3fix-1.6.tgz\"
(depending on which package you downloaded)
- Load the following kernel modules: ip_queue and iptable_mangle with (of course as root):
\"modprobe ip_queue && modprobe iptable_mangle\"
If these modules load without any error message, add them to /etc/modules (also as root):
\"echo ip_queue >> /etc/modules\"
and
\"echo iptable_mangle >> /etc/modules\"
Usage:
Before starting your Loki Game, make sure you have started it (as root) with \"d3fixd &\".
It will run in background then, and will replace the checksums that come from the gameserver.
Posted: Tue Mar 21, 2006 10:57 am
by MD-2389
Cool dude
Posted: Tue Mar 21, 2006 11:02 am
by Xamindar
wow! You are my hero! Thanks. Can't wait to try it when I get home. Descent3 here I come!
Re:
Posted: Tue Mar 21, 2006 11:14 am
by Cuda68
Xamindar wrote:wow! You are my hero! Thanks. Can't wait to try it when I get home. Descent3 here I come!
You da man
Posted: Tue Mar 21, 2006 4:46 pm
by Top Gun
Just to let you know, Munk, I did get your e-mail about this a few days ago; I'll get it in the news in the next few days.
Posted: Wed Mar 22, 2006 12:00 am
by Xamindar
dang, I guess it was too good to be true. I installed the program, loaded the kernel modules mentioned, ran it as root, confirmed it was in memory, started D3.
Tried to join Subway dancer: BOOM, error
Earthshaker 2001: BOOM, error
Posted: Wed Mar 22, 2006 1:56 am
by Munk
Oh I see this descent protocol works different on american servers. It works on european servers. Sorry, I didn't test that on american servers (who could think of something like that?).
I'll put up a patch this evening.
Sorry for your disappointment.
Posted: Wed Mar 22, 2006 3:20 am
by Munk
Ok, new packets are up.
Downloadlinks have been updated (see above). Enjoy (hopefully this time
Note to mind: no assumptions allowed, test _everything_ ...
Posted: Wed Mar 22, 2006 10:05 am
by Krom
I had MD link to this thread from the Multiplayer forum 'find games and patch' sticky thread.
Re:
Posted: Wed Mar 22, 2006 11:14 am
by Xamindar
Munk wrote:Oh I see this descent protocol works different on american servers. It works on european servers. Sorry, I didn't test that on american servers (who could think of something like that?).
I'll put up a patch this evening.
Sorry for your disappointment.
Very strange, what is the difference?
Thanks again!
Posted: Wed Mar 22, 2006 1:21 pm
by Munk
Difference was 1 Byte in the packet signature. I thought it would be constant (I tried only on EU servers), but on US-Servers this Byte is different. Remember there is an US- and an EU Version of Descent3 ?
Did this fix help you ?
Posted: Wed Mar 22, 2006 9:15 pm
by Xamindar
Nope, still no go with the new one.
Posted: Wed Mar 22, 2006 10:35 pm
by Top Gun
At least regarding the Windows version, a lot of people in the US (myself included) actually purchased the Australian version of the game. I don't know whether or not this applies to Linux, but if it did, could that cause the problem?
Re: Fix for Linux Loki Checksum bug
Posted: Thu Mar 23, 2006 8:44 am
by Munk
There's a new version 1.3 out, which *might* solve Xamindar's problem.
Posted: Thu Mar 23, 2006 11:39 am
by Xamindar
Ack, still doesn't work for me. Are there any other Linux D3 players out there who can help out? Where is funky stick man?
Posted: Thu Mar 23, 2006 11:52 am
by Munk
I sent you a PM, where you should test a debug version.
Posted: Thu Mar 23, 2006 3:59 pm
by Munk
Ok, I did a mistake in recording the checksums.
Currently, only Pyro-GL and Phoenix player ships are supported.
Have to add checksums for Magnum-AHT and Black Pyro for all levels. This will take a few days, then there will be an update (once more).
But as a bonus: Current Version 1.3 already includes a patch for that High Ping bug, which some Loki-Users experience (ping will raise up to 500ms or more after a few seconds of play).
Posted: Thu Mar 23, 2006 7:43 pm
by Xamindar
Aww I see, all works now that I'm using the GL. One thing that just happened to me in subway dancer was once the level ended and restarted I again got the \"Levels don't match\" error.
Thanks again for this wonderful tool.
EDIT: Also, could you post a little info on how we can add levels that are not in your program for future info?
Posted: Thu Mar 23, 2006 8:18 pm
by FunkyStickman
I'm flattered somebody actually *asked* for my input
I have my main machine apart for cleaning at the moment (horrible allergy season), and I'm surfing on my fileserver, but as soon as I get it back together, will thrash this intently tonight. My goodness, this could be awesome! it *IS* awesome!
Holy freakin' goodness. This could be better than sex.
Naah.
Posted: Thu Mar 23, 2006 8:30 pm
by FunkyStickman
You know, I seriously got to thinking about this problem recently, and as I understand it, the bug is actually in the Windows 1.4 version, and was also fixed in the Windows 1.5 version. How hard would it be to get Loki's 1.4b to report itself as 1.5 to Windows servers? What kind of repercussions would be involved? Assuming you could get them to connect, would it even work?
Not to detract from what you've done here at all (please, please, don't think I'm not thrilled) but isn't this basically \"breaking\" the Linux client to match the bug in the Windows client? Wouldn't it be easier (if it worked) to just change the version number reported from the Linux client?
I'm not a (good) programmer, so I don't know what kind of information the clients pass through to each other, nor how much of that information is actually version-specific. If the data packets are pretty much the same, I wonder why this couldn't be done. Maybe you could just disable the version-checking code and see what happens?
Feel free to ridicule my analysis of the problem. I'll be busy playing Varicose Veins.
Posted: Fri Mar 24, 2006 12:26 am
by Munk
With Level restarts, I will see what I can do about that.
Yes, there will be a tool which can add checksums from running servers. It's the one I use to update the checksum database which everyone can download to add more missions.
My understanding of Descent3 Online packets is very poor. But I don't think it's possible to have a current Loki version acts like an 1.5er Windows version. If they did improve some issue in netcode, this is almost impossible to \"emulate\". Playing with Loki then would be more unstable that it was before with just 1.4.
As I does not play with Loki regulary, please tell me every situation where this fix rises problems. Don't wait for me to find out myself, this would possibly never happen
Re:
Posted: Fri Mar 24, 2006 7:21 am
by FunkyStickman
Munk wrote:
My understanding of Descent3 Online packets is very poor. But I don't think it's possible to have a current Loki version acts like an 1.5er Windows version. If they did improve some issue in netcode, this is almost impossible to "emulate". Playing with Loki then would be more unstable that it was before with just 1.4.
Okay, fair enough, I was just wondering
I'll have the machine up by this afternoon to test this out.
Posted: Sat Mar 25, 2006 10:08 am
by FunkyStickman
Okay, here's what I got when I ran d3fixd as root:
Can't load '/tmp/par-stickman/cache-bcf141fd5bdcd1c5aa6c1e6dce3f2656a660ef38/4da5e80b.so' for module Net::RawIP: libpcap.so.0.7: cannot open shared object file: No such file or directory at /usr/lib/perl/5.8/DynaLoader.pm line 225.
at /usr/share/perl5/PAR/Heavy.pm line 107
Compilation failed in require at script/d3fixd.pl line 21.
BEGIN failed--compilation aborted at script/d3fixd.pl line 21.
Thoughts? My system should be (very) up-to-date. I'll try updating perl anyway, see what happens. I'm running SuSE 10.0 OSS, and I update everything with Yum.
Posted: Sat Mar 25, 2006 10:29 am
by Munk
This is version 1.4, which is currently in development.
Use 1.3 as described above.
Posted: Sat Mar 25, 2006 10:32 am
by FunkyStickman
Stupid me, that's what I get for trying to be bleeding edge
(edit) I just tried launching into Varicose Veins, and I still got the \"Levels don't match\" error. I have the kernel modules loaded, and I erased 1.4 and installed 1.3, didn't give me any errors. I'm running the 1.4b Loki client.
(edit ^2) I tried Subway Dancer, got the same error. Pretty sure I have the right level files.
(edit ^3) NEVER FREAKING MIND, I'm teh moron, the daemon died in the background, fired up the daemon and all is well.
Posted: Sat Mar 25, 2006 12:33 pm
by Xamindar
lol
Posted: Sat Mar 25, 2006 1:05 pm
by Munk
Sugoi .., new version has arrived.
Download 1.5 (see links above).
Why? Otherwise you will miss THAT:
Of course: Magnum and Black Pyro has been added successfully. Fixed the Checksum replacement on level change also.
Have Phun!
Posted: Sat Mar 25, 2006 1:26 pm
by Xamindar
OH MY GOSH!! I can't wait to get home and try this now! How did you get all the games to show up in the list? I usually have to alt-enter out and get a new ip to type in and connect to.
Posted: Sat Mar 25, 2006 4:30 pm
by FunkyStickman
OH MY FREAKING EYE
Tried Subway Dancer, worked with the GL and not the the BP... will try again in a bit.
Posted: Sat Mar 25, 2006 6:28 pm
by FunkyStickman
WTF? All of a sudden, it's crashing.. here's what I get.
/usr/local/sbin/d3fixd &
[1] 15427
stickman-linux:/home/stickman/Desktop # starting Filter
Reloading Checksums: 3084
### Here's where I try to join a game ###
stickman-linux:/home/stickman/Desktop # (tap) Can't get interface IP address at Net/RawIP.pm line 234.
[1]+ Exit 99 /usr/local/sbin/d3fixd
Any ideas? I can launch D3, it shows the IP address, but when I click \"Join Game\" nothing shows up in the bottom window, and the fix daemon dies. It shouldn't matter, but my net card is eth1... I don't know. It worked this morning.
(edit) went back to version 1.3, and it works fine.
Posted: Sat Mar 25, 2006 7:30 pm
by Xamindar
Posted: Sat Mar 25, 2006 11:44 pm
by Nosferatu
I was wondering if this could be used, or sometime in the future be used, to run a linux server that does allows other windows games to connect to it.
It would be nice if I could eventually chuck the need to run it under wine.
Posted: Sun Mar 26, 2006 2:42 am
by Munk
@FunkyStickman: sent you an PM.
@Nosferatu: yes, should be no problem. Just filter the other way around and have a reverse lookup. Will try that next week. But Loki can only run one instance only at the same time, since you can't tell it which port to use.
Posted: Tue Mar 28, 2006 1:57 pm
by Top Gun
All right, you're in the PD news. Keep up the great work.
Posted: Thu Mar 30, 2006 11:40 am
by Munk
Ok, as the last bugs have been fixed and no new have been reported, I'll try to add some options to allow loki servers, disable internet/lan scan etc.
Posted: Thu Mar 30, 2006 3:20 pm
by FunkyStickman
I just found a bug! I'm running the 1.6 filter, and when I try to auto-download a level, D3 crashes with a Segfault (Signal 11). I stopped the filter, re-tried the level, and it downloaded without a problem.
Posted: Fri Mar 31, 2006 3:56 am
by Munk
This bug does not appear on my machine.
Which Server, which mission, which ship ?
Posted: Fri Mar 31, 2006 6:43 am
by FunkyStickman
It was on D1.Descent.cx and the level was \"D3 Krackdown\". I was in the Pyro-GL.
Posted: Sun Apr 02, 2006 2:35 am
by Munk
I'm sorry Funky, I can't reproduce this bug. Seems fine on my machine. Only the third download URL works. At other locations, I get an \"Unable to download mission\", but Descent does not crash.
Posted: Sun Apr 02, 2006 11:06 am
by FunkyStickman
Very interesting. It's not a deal-breaker, so I can live with it. If I run across anything else like this, I'll let you know. It could have just been D3 crapping out because it couldn't download it.
Again, fantastic work, keep it up.