]> git.baikalelectronics.ru Git - kernel.git/commit
ip_tunnel: fix i_key matching in ip_tunnel_find
authorDmitry Popov <ixaphire@qrator.net>
Sat, 7 Jun 2014 23:03:08 +0000 (03:03 +0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 07:43:37 +0000 (00:43 -0700)
commitf71e4fc72b9a283986db49ec8f5f47d08a541a82
treee34303a4c625ab15d9a1bb457181227973721461
parentce049c3fec8b4cdeab76a92c903903cb8ce2f34f
ip_tunnel: fix i_key matching in ip_tunnel_find

Some tunnels (though only vti as for now) can use i_key just for internal use:
for example vti uses it for fwmark'ing incoming packets. So raw i_key value
shouldn't be treated as a distinguisher for them. ip_tunnel_key_match exists for
cases when we want to compare two ip_tunnel_parms' i_keys.

Example bug:
ip link add type vti ikey 1 local 1.0.0.1 remote 2.0.0.2
ip link add type vti ikey 2 local 1.0.0.1 remote 2.0.0.2
spawned two tunnels, although it doesn't make sense.

Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel.c