Disable UDP Checksum Validation on Receive

I have a source that is sending udp packets with invalid checksum headers, and I don't have control over the source. I can see on wireshark that these packets are making it to the destination host, but the application is not picking them up because of the invalid udp checksum. I would like to have an application on the host (windows server 2012) receive these packets and resend them with a valid checksum so the application picks the packets up.

I have tried using the .NET Socket object with SocketType RAW and ProtocolType IP, but it also ignores the packets.

1 Answer

Your approach of using RAW sockets is actually not too far off from what you need.

Most likely, your system has UDP checksumming offloaded to the network card, which means that the NIC is doing the checksum validation before the OS even sees the packet. This is great for performance reasons, but means that in your case, you have literally no option to get to those packets.

Unfortunately, figuring out if this is enabled is a bit different on every OS. On Linux, you can use ethtool to check form the command-line (there is no GUI method that I know of). On Windows, it's hidden away in the advanced tab of the driver properties for the NIC (you may not even be able to see or control it there though, it depends on the driver).

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like