Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix TcpClient Ip Header Bad Checksum

I'm using System.Net.Sockets.TcpClient class but whenever I send custom packet over the network I'm seeing bad checksum on my wireshark capture. How can I fix it?

like image 762
powerbox Avatar asked Feb 25 '23 20:02

powerbox


1 Answers

The problem is that you have checksum offloading set on your network interface.

This causes your network card to calculate the checksum and not Windows. WireShark will detect this as incorrect checksums, but they really aren't.

In the properties of your network interface, if you click [Configure], the [Advanced] tab has a [Offload Checksum] item. If you set that to [Disabled], WireShark will display that the checksums are correct.

like image 65
Pieter van Ginkel Avatar answered Mar 03 '23 10:03

Pieter van Ginkel