The ipv6 header len might have extension header, but current code simply returns fixed ipv6 header length 40-byte.
Signed-off-by: William Tu <[email protected]> --- lib/netdev-native-tnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c index fb5eab033758..c3e698d2e72b 100644 --- a/lib/netdev-native-tnl.c +++ b/lib/netdev-native-tnl.c @@ -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)", -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
