Bug 1459605 - Open vSwitch userspace datapath does not handle IP options
Open vSwitch userspace datapath does not handle IP options
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openvswitch (Show other bugs)
7.4
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Eelco Chaudron
ovs-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-07 10:46 EDT by Eric Garver
Modified: 2017-10-26 10:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Garver 2017-06-07 10:46:42 EDT
While OVS userspace datapath (OVS-DPDK) supports GREv6, it does not inter-operate with a native Linux ip6gretap tunnel. This is because the Linux driver uses IPv6 optional headers for the Tunnel Encapsulation Limit (rfc 2473, section 6.6). OVS userspace simply does not parse these IPv6 header inside netdev_tnl_ip_extract_tnl_md(), as such popping the tunnel leaves extra bytes resulting in a mangled decapsulated frame as shown by the tcpdump below.

Unfortunately iproute2 cannot tune or omit this tunnel option, see bug 1459600. So there is no work around here.



Here is the full encapsulated frame:

[root@rhel7-test1 ~]# tcpdump -i ovs-p0 -vv -nn -xx
tcpdump: listening on ovs-p0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:38:06.925539 IP6 (flowlabel 0x2f8ea, hlim 64, next-header unknown (60) payload length: 54) fc00::1 > fc00::100: DSTOPT (opt_type 0x04: len=1)(padn) GREv0, Flags [none], length 4
        ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.1.1.100 tell 10.1.1.1, length 28
        0x0000:  62bb 2795 0041 222a 1d8b 1427 86dd 6002
        0x0010:  f8ea 0036 3c40 fc00 0000 0000 0000 0000
        0x0020:  0000 0000 0001 fc00 0000 0000 0000 0000
        0x0030:  0000 0000 0100 2f00 0401 0401 0100 0000
        0x0040:  6558 ffff ffff ffff 4a0f 73b0 8dd9 0806
        0x0050:  0001 0800 0604 0001 4a0f 73b0 8dd9 0a01
        0x0060:  0101 0000 0000 0000 0a01 0164



Decapsulated ARP frame below. Note the "0000 6558" is the actual GRE header. The preceding 4 bytes are cruft from a truncated IPv6 destination option as noted above.

[root@rhel7-test1 ~]# tcpdump -i br0 -vv -nn -xx
tcpdump: listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:45:29.103047 65:58:ff:ff:ff:ff > 04:01:01:00:00:00, ethertype Unknown (0xffff), length 50:
        0x0000:  0401 0100 0000 6558 ffff ffff ffff c60f
        0x0010:  a33d f4f4 0806 0001 0800 0604 0001 c60f
        0x0020:  a33d f4f4 0a01 0101 0000 0000 0000 0a01
        0x0030:  0164
Comment 3 Eric Garver 2017-06-28 09:45:59 EDT
Until recently, the kernel did not add IPv6 options for ip6gretap tunnels. This a bug and is fixed by

   89a23c8b528b ("ip6_tunnel: Fix missing tunnel encapsulation limit option")

As such, you should use a 4.12+ kernel to reproduce this issue.
Comment 4 Eelco Chaudron 2017-07-06 08:51:45 EDT
Fix has been send upstream to OVS dev; https://mail.openvswitch.org/pipermail/ovs-dev/2017-July/334993.html

Note You need to log in before you can comment on or make changes to this bug.