qemu-e2k/include/net
Ed Swierk 0dacea92d2 net: Transmit zero UDP checksum as 0xFFFF
The checksum algorithm used by IPv4, TCP and UDP allows a zero value
to be represented by either 0x0000 and 0xFFFF. But per RFC 768, a zero
UDP checksum must be transmitted as 0xFFFF because 0x0000 is a special
value meaning no checksum.

Substitute 0xFFFF whenever a checksum is computed as zero when
modifying a UDP datagram header. Doing this on IPv4 and TCP checksums
is unnecessary but legal. Add a wrapper for net_checksum_finish() that
makes the substitution.

(We can't just change net_checksum_finish(), as that function is also
used by receivers to verify checksums, and in that case the expected
value is always 0x0000.)

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-11-20 11:08:00 +08:00
..
checksum.h net: Transmit zero UDP checksum as 0xFFFF 2017-11-20 11:08:00 +08:00
eth.h slirp: add a fake NC-SI backend 2017-04-25 19:17:25 +08:00
filter.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
net.h net/net.c: Add vnet_hdr support in SocketReadState 2017-07-17 20:02:11 +08:00
queue.h net/queue: export qemu_net_queue_append_iov 2015-10-12 13:31:18 +08:00
slirp.h hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() 2015-02-18 11:58:50 +01:00
tap.h virtio-net,tap: use standard-headers 2015-02-26 13:04:04 +01:00
vhost_net.h vhost-net: Notify the backend about the host MTU 2017-01-10 07:02:53 +02:00
vhost-user.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00