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:40:22 +0000 (15:40 -0700)
commit0020b5b59aa385c571a428af694504ab4a649342
treebf95649ac109c1fea9e0be8fa0777a099183d84b
parentab09c9f04f3be6b44c077a0239059fa00656d3b7
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