]> git.proxmox.com Git - ovs.git/commitdiff
userspace: return correct ipv6 header len.
authorWilliam Tu <u9012063@gmail.com>
Fri, 9 Mar 2018 21:02:22 +0000 (13:02 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 5 Apr 2018 00:23:18 +0000 (17:23 -0700)
The ipv6 header len might have extension header, but current
code simply returns fixed ipv6 header length 40-byte.

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/netdev-native-tnl.c

index fb5eab0337585193c7d44b22359a13b0d890d36c..c3e698d2e72b9a00f4c766eb950dca79bcae63dc 100644 (file)
@@ -123,7 +123,7 @@ netdev_tnl_ip_extract_tnl_md(struct dp_packet *packet, struct flow_tnl *tnl,
         tnl->ip_tos = ntohl(tc_flow) >> 20;
         tnl->ip_ttl = ip6->ip6_hlim;
 
-        *hlen += IPV6_HEADER_LEN;
+        *hlen += packet->l4_ofs - packet->l3_ofs;
 
     } else {
         VLOG_WARN_RL(&err_rl, "ipv4 packet has invalid version (%d)",