>       pkt.ipbit.ip_sum=in_cksum((unsigned short*)(void*)&pkt,20);
>       pkt.tcpbit.th_sum=tcpsum(&pkt.ipbit);

You need to do the TCP checksum first.  It changes the payload (the TCP 
checksum).  The IP checksum includes all data, so must be done after the
payload changes are done.

-Les

-- 
Les Biffle            
(480) 585-4099    [EMAIL PROTECTED]  http://www.les.safety.net/
Network Safety Corp., 5831 E. Dynamite Blvd.,  Cave Creek, AZ 85331

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to