linux-stable/net/xfrm
Nicolas Dichtel 153bd25686 xfrm interface: fix management of phydev
commit 22d6552f82 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: f203b76d78 ("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
..
Kconfig ipsec: select crypto ciphers for xfrm_algo 2019-07-26 09:14:10 +02:00
Makefile
xfrm_algo.c
xfrm_device.c
xfrm_hash.c
xfrm_hash.h
xfrm_input.c xfrm: release device reference for invalid state 2019-12-13 08:51:03 +01:00
xfrm_interface.c xfrm interface: fix management of phydev 2019-12-13 08:52:42 +01:00
xfrm_ipcomp.c
xfrm_output.c xfrm: Fix error return code in xfrm_output_one() 2019-01-13 09:50:57 +01:00
xfrm_policy.c xfrm: Honor original L3 slave device in xfrmi policy lookup 2019-05-25 18:23:41 +02:00
xfrm_proc.c
xfrm_replay.c
xfrm_state.c xfrm: Fix memleak on xfrm state destroy 2019-12-05 09:21:27 +01:00
xfrm_sysctl.c
xfrm_user.c xfrm: fix sa selector validation 2019-07-26 09:14:08 +02:00