• Vadim Fedorenko's avatar
    ip6_tunnel: fix ip6_tnl_lookup · f9d4850a
    Vadim Fedorenko authored
    [ Upstream commit 68d00f33 ]
    
    The commit ea3dc960 ("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: ea3dc960 ("ip6_tunnel: Add support for wildcard tunnel endpoints.")
    Signed-off-by: default avatarVadim Fedorenko <junk@yandex-team.ru>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f9d4850a
ip6_tunnel.c 47.6 KB