net: Checksum loopback packets
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 6 Jan 2017 19:35:03 +0000 (14:35 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 10 Jan 2017 00:01:40 +0000 (19:01 -0500)
commit9c128487ed8285d74ccbd09f710246690bb85649
tree029d54e936ae90bb88d99b861140ea802ef549dc
parent5f4d4f6f938b935db4d6868f8b9221cf2baa4261
net: Checksum loopback packets

This finalizes the protocol level checksum for packets sent over loopback.

Previously, the network stack thought we were doing checksum offload (e.g.
Btcpck), but we never actually had the right checksum in the protocol
field, which xsum offload is supposed to do.

That would break the VMM's NAT when used over loopback (we'd give the guest
a packet with a bad TCP xsum).

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/net/loopbackmedium.c