ip_tunnel: Do not use inner ip-header-id for tunnel ip-header-id.
authorPravin B Shelar <pshelar@nicira.com>
Tue, 13 Aug 2013 08:41:06 +0000 (01:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 13:54:55 +0000 (06:54 -0700)
commite8d11678770b9bbdcc5c2a9b3a041d136575f322
treec993541a529296ade184e6969ffd661e124cd9b3
parenta8077ef001460c41bc0509b096d3d342002c4d9b
ip_tunnel: Do not use inner ip-header-id for tunnel ip-header-id.

[ Upstream commit 4221f40513233fa8edeef7fc82e44163fde03b9b ]

Using inner-id for tunnel id is not safe in some rare cases.
E.g. packets coming from multiple sources entering same tunnel
can have same id. Therefore on tunnel packet receive we
could have packets from two different stream but with same
source and dst IP with same ip-id which could confuse ip packet
reassembly.

Following patch reverts optimization from commit
490ab08127 (IP_GRE: Fix IP-Identification.)

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
CC: Jarno Rajahalme <jrajahalme@nicira.com>
CC: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vxlan.c
include/net/ip_tunnels.h
net/ipv4/ip_tunnel.c