Reputation: 13843
I'm trying to send some UDP packets to a server. I use Wireshark to monitor my activity. When I send a packet, wireshark tells me my header checksum is incorrect.
At the wireshark preferences the option "Validate the UDP chechsum if possible" is disabled.
this.socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
this.destination = new IPEndPoint(IPAddress.Parse("***.***.***.***"), 80);
this.socket.Connect(this.destination);
this.socket.Send(Encoding.ASCII.GetBytes("foo"));
this.socket.Shutdown(SocketShutdown.Both);
this.socket.Disconnect(true);
Did I forgot something? Do I need to set specific options? Help is much appreciated!
Upvotes: 0
Views: 1884
Reputation: 92792
Known issue - note the "maybe caused by IP Checksum offload". From the Wireshark wiki:
Most modern operating systems support some form of network offloading, where some network processing happens on the NIC instead of the CPU.
[...]
On systems that support checksum offloading, IP, TCP, and UDP checksums are calculated on the NIC just before they're transmitted on the wire. In Wireshark these show up as outgoing packets marked black with red Text and the note [incorrect, should be xxxx (maybe caused by "TCP checksum offload"?)].
The page also lists how to disable this feature for your specific OS.
Upvotes: 3