Closed srubiolpz closed 8 years ago
Use raw socket, disable your firewall & check to be sure
May be side effect of enabled checksum validation on some adapters with offloading? May be add some debug output when it happens?
Problem solved.
I used raw socket, disabled my firewall and it works. Activating the firewall makes the meter not showing the dps again, so the problem was in the "ShinraMeter.exe" path in the exception rule.
I have made a new one using: C:\Users\Desktop\ShinraMeterV0.87\ShinraMeter.exe instead of: %USERPROFILE%\Desktop\ShinraMeterV0.87\ShinraMeter.exe , and now seems to work as fine as usual. I don't know why I have been using the meter during this 2 weeks without .NET 4.6 and the old exception rule path, anyway this should be the right way to go.
Thank you for all your help.
yup, indeed, debug for that can be usefull ^^. But that won't solve the problem ~ checksum, offloading etc... I just want to delete winpcap support & switch everything to raw socket x)
Do you have an idea?
Not sure that there is no setups where winpcap works but raw sockets not. At least I'll left it as an option.
If we put that
var checksum = ipPacket.Checksum;
if (ipPacket.CalculateIPChecksum() != checksum)
{
return;
}
Instead of that https://github.com/neowutran/ShinraMeter/blob/master/NetworkSniffer/IpSnifferWinPcap.cs#L106
? reading the checksum header, computing the checksum & checking?
Current code checks not only ip checksum, but tcp one as well, as far as I understand.
winpcap also give the way to use meter on other machine than playing tera, so that it is 100% undetectable by any protection.
Yup, won't delete winpcap, just raging against it. I just don't understand how to make it work as we want
btw, all offloading issues should affect only outgoing traffic, which can be safely ignored by meter.
Or we can just check for correct totallength to get rid of runtime error and forget about checksums.=)
But first it should be better to add some debug output to see whether it is definitely global problem with checksums, on my comp it never triggered.
^^ trying few thing & I push
added the invalid checksum as an exception, so logged in error.log + over network
2 users on RU forum have the same issue. may be checksum validation was bad idea...
The idea was to test what happen if we use checksum validation ^^ now we know
Enable checksum offloading on my machine (was switched off due to some virtualization or vpn issues, don't remember now) - faced with same issue. So the only way is to check for correct packet length and leave checksum validation off.
ok ^^ and we can keep checksum validation for incoming packet only
(Huuuue how did you enabled offloading on your os? I saw that: https://msdn.microsoft.com/en-us/library/windows/hardware/ff571012%28v=vs.85%29.aspx , but it seems that offloading is already activated on my computer & no problem with the meter)
In my case it was disabled in adapter preferences.
btw, it triggered not on incoming game server connection, but on login server outgoing, since winpcap filter is set to the whole subnet.
ok, thx. Will try to make it crash on my computer.
But we still need first packets of client-to-server connection to calculate keys.
thats why it fails to process game data when validation is on.
So we can't validate checksums until we get all keys
huuue, we can just make the checksum validation for incoming packet using the packet destination & the list of Tera server ?
Yes, working fine here
but not destination, source )
I m unable to activate offloading on my card, does this work for you?
if (!ipPacket.ValidChecksum)
{
if (_servers.IndexOf(ipPacket.DestinationAddress.ToString()) == -1)
{
//Bad checksum on incoming packet
return;
}
}
Exception is to check only, to be replaced by return.
ok ^^ I m making a release, I keep the exception, so we will maybe see it in debug.txt
released & cleared http://diclah.com/~yukikoo/debug/debug.txt
I have been using ShinraMeter from 2 weeks ago. Today I decided to update my v0.85 to v.087 as I usually do (clicking "yes" as soon as the update window pops up and wait, then clicking the .exe again). I don't know why but this time the updater seemed to crash; after that I got an error every time I tried to open v0.85. I deleted v0.85 and downloaded the new version from the cloud.
The point is that now I'm not able to see the DPS from me or my party. The UI opens fine but not showing the DPS as soon as I hit something.
I'm playing in EU/Killian, not using VPN, SO Windows 10 and wired internet conection. I was using the meter with WinPcap, and I have tried to disable it and enable Raw Sockets but nothing happens.
I updated my .NET framework to 4.6.1 (I think I did not even have 4.6 installed before, but I was able to use the meter) from here: https://www.microsoft.com/es-es/download/details.aspx?id=49981 I also have the firewall exception added.
Any help will be welcome. Thank you.