datapath-windows: Support for IPv6 in TCP segmentation
authorSairam Venugopal <vsairam@vmware.com>
Mon, 29 Feb 2016 19:42:12 +0000 (11:42 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 15 Mar 2016 03:38:09 +0000 (20:38 -0700)
commit884d541fdffe44714eb9381fb92f8f4e1cfcf668
tree72d02f8c19d49f5e01b2c517ca5d3277df292fd4
parentb6446b9fa0fd0a41b5ec28fbff96eab7128c05a9
datapath-windows: Support for IPv6 in TCP segmentation

When a packet which needs segmentation is received, the header for
each segment is being calculated, i.e. IP length, checksum, TCP seq,
TCP checksum.

The problem with the current code is that it wrongly assumes that
the Ethernet frame payload is always an IPv4 packet.

This patch checks the EtherType field of the Ethernet frame to see
which protocol is encapsulated in its payload, IPv4 or IPv6, and
calculates the segment's header accordingly.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Co-authored-by: Sairam Venugopal <vsairam@vmware.com>
Reported-by: Sairam Venugopal <vsairam@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/105
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
datapath-windows/ovsext/BufferMgmt.c