ip6_gre: don't allow to remove the fb_tunnel_dev
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 14 Apr 2014 15:11:38 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 May 2014 20:20:34 +0000 (13:20 -0700)
commit846a8da8c1e891ac0201a90739b8f3275bcf6e8f
tree80d23f86619de275aab9eb16bc0f5ea948b3ea93
parent9038f47699cad8883196ac57bae36418ab60d60c
ip6_gre: don't allow to remove the fb_tunnel_dev

[ Upstream commit 54d63f787b652755e66eb4dd8892ee6d3f5197fc ]

It's possible to remove the FB tunnel with the command 'ip link del ip6gre0' but
this is unsafe, the module always supposes that this device exists. For example,
ip6gre_tunnel_lookup() may use it unconditionally.

Let's add a rtnl handler for dellink, which will never remove the FB tunnel (we
let ip6gre_destroy_tunnels() do the job).

Introduced by commit c12b395a4664 ("gre: Support GRE over IPv6").

CC: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/ip6_gre.c