IPStack - Heaps of network fixes
[tpg/acess2.git] / Modules / IPStack / tcp.c
index e42e940..18150a3 100644 (file)
@@ -84,7 +84,7 @@ void TCP_SendPacket( tTCPConnection *Conn, size_t Length, tTCPHeader *Data )
                buf[2] = (htons(Length)<<16) | (6<<8) | 0;
                Data->Checksum = 0;
                memcpy( &buf[3], Data, Length );
-               Data->Checksum = IPv4_Checksum( buf, buflen );
+               Data->Checksum = htons( IPv4_Checksum( buf, buflen ) );
                free(buf);
                IPv4_SendPacket(Conn->Interface, Conn->RemoteIP.v4, IP4PROT_TCP, 0, Length, Data);
                break;

UCC git Repository :: git.ucc.asn.au