]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_tunnel: fix ip6_tnl_lookup
authorVadim Fedorenko <junk@yandex-team.ru>
Tue, 11 Oct 2016 19:47:20 +0000 (22:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2016 14:01:26 +0000 (10:01 -0400)
commit053c324c3f3e14d569c43ab2aca8099f5afe1e7a
tree25d61775c649aef151a63590e904f35d43f37733
parente2dfe2e7e1959f95c02ad2affb59422ef1e88bf4
ip6_tunnel: fix ip6_tnl_lookup

The commit 3c8caeac6587 ("ip6_tunnel: Add support for wildcard tunnel
endpoints.") introduces support for wildcards in tunnels endpoints,
but in some rare circumstances ip6_tnl_lookup selects wrong tunnel
interface relying only on source or destination address of the packet
and not checking presence of wildcard in tunnels endpoints. Later in
ip6_tnl_rcv this packets can be dicarded because of difference in
ipproto even if fallback device have proper ipproto configuration.

This patch adds checks of wildcard endpoint in tunnel avoiding such
behavior

Fixes: 3c8caeac6587 ("ip6_tunnel: Add support for wildcard tunnel endpoints.")
Signed-off-by: Vadim Fedorenko <junk@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_tunnel.c