tunneling: Don't match on source IP address for native tunnels.
authorJesse Gross <jesse@nicira.com>
Wed, 24 Jun 2015 21:44:50 +0000 (14:44 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 25 Jun 2015 22:24:31 +0000 (15:24 -0700)
commiteaac0f22b95c34e99a4c14910359148726f9725c
treea63da816b6649831ea753c2aeb968197e7706157
parentbd8baf47a11a00563f7096ea51f4fc9446a321c0
tunneling: Don't match on source IP address for native tunnels.

When doing native tunneling, we look at packets destined to the
local port to see if they match tunnel protocols that we should
intercept. The criteria are IP protocol, destination UDP port, etc.

However, we also look at the source IP address of the packets. This
should be a function of the port-based tunnel layer and not the
tunnel receive code itself. For comparison, the kernel tunnel code
has no idea about the IP addresses of its link partners. If port
based tunnel is desired, it can be handled using the normal port
tunnel layer, regardless of whether the packets originally came
from userspace or the kernel.

For port based tunneling, this bug has no effect - the check is
simply redundant. However, it breaks flow-based native tunnels
because the remote IP address is not known at port creation time.

CC: Pravin Shelar <pshelar@nicira.com>
Reported-by: David Griswold <David.Griswold@overturenetworks.com>
Tested-by: David Griswold <David.Griswold@overturenetworks.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
lib/tnl-ports.c
lib/tnl-ports.h
ofproto/tunnel.c
tests/tunnel-push-pop.at