Correct the length field in IPv6 packets when applying software fallback
GSO. Previosuly the field retained an IPv4 header size, which was
incorrect.

Signed-off-by: Mike Pattrick <[email protected]>
Fixes: 8b5fe2dc6080 ("userspace: Add Generic Segmentation Offloading.")
---
v6: include ip6 extensions
---
 lib/dp-packet-gso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dp-packet-gso.c b/lib/dp-packet-gso.c
index e2c141b32..847685ad9 100644
--- a/lib/dp-packet-gso.c
+++ b/lib/dp-packet-gso.c
@@ -142,7 +142,7 @@ dp_packet_gso(struct dp_packet *p, struct dp_packet_batch 
**batches)
             struct ovs_16aligned_ip6_hdr *ip6_hdr = dp_packet_l3(seg);
 
             ip6_hdr->ip6_ctlun.ip6_un1.ip6_un1_plen
-                = htons(sizeof *ip_hdr + dp_packet_l4_size(seg));
+                = htons(dp_packet_l3_size(seg) - sizeof *ip6_hdr);
         }
 
         /* Update L4 header. */
-- 
2.39.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to