Nicolas Dichtel 153bd25686 xfrm interface: fix management of phydev
commit 22d6552f827ef76ade3edf6bbb3f05048a0a7d8b upstream.

With the current implementation, phydev cannot be removed:

$ ip link add dummy type dummy
$ ip link add xfrm1 type xfrm dev dummy if_id 1
$ ip l d dummy
 kernel:[77938.465445] unregister_netdevice: waiting for dummy to become free. Usage count = 1

Manage it like in ip tunnels, ie just keep the ifindex. Not that the side
effect, is that the phydev is now optional.

Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-13 08:52:42 +01:00
..
2019-10-11 18:21:12 +02:00
2019-12-05 09:21:07 +01:00
2019-11-10 11:27:53 +01:00
2019-06-22 08:15:13 +02:00
2019-12-05 09:21:30 +01:00
2019-12-13 08:52:29 +01:00
2019-12-05 09:21:31 +01:00
2019-12-01 09:16:33 +01:00
2018-07-24 14:10:42 -07:00
2019-01-09 17:38:33 +01:00
2018-07-24 14:10:43 -07:00