checksum error with building an HTTP packet(but over TCP, like syn/ack its ok)

Posted by Hila on Stack Overflow See other posts from Stack Overflow or by Hila
Published on 2010-06-02T15:40:53Z Indexed on 2010/06/02 15:44 UTC
Read the original article Hit count: 222

Filed under:
|
|

I am building a NAT program,I change each packet that comes from our internal subnet, change it's source IP address by libnet functions.( catch the packet with libpcap, put it sniff structures and build the new packet with libnet)

I am trying to build an http packet. When I look on wireshark, I see that the new packet that I have built is exectly like the original packet(the only diffrent is that I changed the src port and ip), but there is a checksum error, So the server don't do anything with the packet that I have sent to him, beacuse the cheksum field is wrong. When I send a tcp packet(like syn or ack), the checksum is ok, and the server respons.

Is anyone knows what can cause this problem? the new checksum in other packets is calculated as it should be.. but in the HTTP packet it doesn't..

© Stack Overflow or respective owner

Related posts about http

Related posts about checksum