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: 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>
This commit is contained in:

committed by
Steffen Klassert

parent
c5d1030f23
commit
22d6552f82
@@ -990,7 +990,6 @@ struct xfrm_if_parms {
|
||||
struct xfrm_if {
|
||||
struct xfrm_if __rcu *next; /* next interface in list */
|
||||
struct net_device *dev; /* virtual device associated with interface */
|
||||
struct net_device *phydev; /* physical device */
|
||||
struct net *net; /* netns for packet i/o */
|
||||
struct xfrm_if_parms p; /* interface parms */
|
||||
|
||||
|
Reference in New Issue
Block a user