sipb / spike

Implementing a packet level software network load balancer
MIT License
11 stars 10 forks source link

Fix recompute checksum bug in rewriting #34

Closed krawthekrow closed 7 years ago

krawthekrow commented 7 years ago

When the total_length field of the IP header is changed, we need to recompute its checksum.

It might be better to use IP_HEADER_LENGTH (a true constant) in the header constructor, saving a few instruction cycles since we wouldn't need to recompute the checksum.

cryslith commented 7 years ago

Merged in d726e22bad2e6d7aac7704b9de1c2f16322e4d9f.