Reply To: Modified packets sent from LAN to WAN across NAT (chcksm ok)

Home Forums Discussions Support Modified packets sent from LAN to WAN across NAT (chcksm ok) Reply To: Modified packets sent from LAN to WAN across NAT (chcksm ok)

#5828
elpa
Participant

    Hello SerpentFly, first I’d like to thank you for the response. I have already solved the problem.

    As I analyzed it, I saw that I had two problems. First – I had a bug in IP header total length computation – so the packets on the receiver’s side were discarded by the mstcp (I feel a little bit shamed about it 😳 …….). The second problem was really with MACs. In my application I did not pass the “not IP packets” like ARP to adapter/mstcp. I took care only of IP packets, others were dropped. This resulted in connection brakedown of course. What confused me was that the packet was really delivered and processed by my routines on the WAN host. But I realized that I was sending ICMP messages between those hosts before I had started my application, so MACs were known. When I paused it for a while, the ARP cache had exceeded or something (I should read more details about ARP) and therefore no packet could be delivered to the destination host. Another confusion was that it worked fine on LAN. Maybe MS doesn’t take care of IP length field when processing packets from the local network. I was transmitting 75 MB file with no perceptible error on the local network.

    Now it works perfectly, so once again, thank you very much.