Dolphin, the GameCube and Wii emulator - Forums

Full Version: Wrong checksum in UDP packets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Leseratte10

Hello,

I don't know if this is the right place for my question. If not, please move it.

I sometimes play MKWii online with Dolphin, I'm using "Dolphin [wii-network] 3.5-1382". I've found a tool, which can analyze the network traffic of MKWii and displays it in a human readable form (http://wiki.tockdom.com/wiki/Wiimms_mkw-ana_%28tool%29 ). This works perfectly for the Wii, but not in Dolphin. I opened the recording in Wireshark and found out: In all packets sent by Dolphin there is a wrong IP Header checksum (it's always 0x0000), so those packets will be rejected by the tool.

Why are the checksums wrong? Do I have to set a special setting in Dolphin for that? Or isn't that implemented yet?

leseratte10
Please consider that 1) the wii-network branch is a Work-In-Progress that's not ready to be merged with the master branch just yet and 2) Dolphin isn't a perfect 1:1 replication of the original Wii hardware. It's very, very accurate on a lot of points, but it's not at 100%, yet. Given the above, you can expect things like this to happen. There's an exact technical reason behind it, but I'll leave that to one of our knowledgeable developers (or someone else familiar with the code) to answer that.
IP headers aren't always computed by your OS (sometimes it's done directly in the NIC). I'm also not sure if it's optional or not for UDP packets (one of the two checksums is optional: IP/UDP) - would have to check.

In any case, we don't do anything weird with packets on wii-network, it's all sent via the standard socket library of your system. I wouldn't worry about this.
(08-04-2013, 05:50 PM)Leseratte10 Wrote: [ -> ]Hello,

I don't know if this is the right place for my question. If not, please move it.

I sometimes play MKWii online with Dolphin, I'm using "Dolphin [wii-network] 3.5-1382". I've found a tool, which can analyze the network traffic of MKWii and displays it in a human readable form (http://wiki.tockdom.com/wiki/Wiimms_mkw-ana_%28tool%29 ). This works perfectly for the Wii, but not in Dolphin. I opened the recording in Wireshark and found out: In all packets sent by Dolphin there is a wrong IP Header checksum (it's always 0x0000), so those packets will be rejected by the tool.

Why are the checksums wrong? Do I have to set a special setting in Dolphin for that? Or isn't that implemented yet?

leseratte10
The following two commands switched off all types of offloading.

$ ethtool --offload eth0 rx off tx off
$ ethtool -K eth0 gso off

Here is the output of ethtool before disabling TCO:

$ ethtool --show-offload eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off
ntuple-filters: off
receive-hashing: off