]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm interface: fix management of phydev
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 15 Jul 2019 10:00:23 +0000 (12:00 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 17 Jul 2019 08:03:54 +0000 (10:03 +0200)
commit9777222aa0b13d64624f5328202c7351dc440fc7
treeeef63032d09302072b65a0b8654460d24c5cc753
parentf4c1ac776990dd753797b50e14e189d325a5a5d1
xfrm interface: fix management of phydev

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: 6b26f4d41932 ("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>
include/net/xfrm.h
net/xfrm/xfrm_interface.c