mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-25 08:02:57 +00:00
trelay: handle netdevice events correctly
Since v3.11, netdevice notification data are of type
"struct netdev_notifier_info". Handle it as such!
This should fix a critical bug in which devices are unable get released
because trelay does not release resources in response to UNREGISTER
event spamming the log with something like:
unregister_netdevice: waiting for eth0.1 to become free. Usage count = 1
Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
(cherry picked from commit 77cfc0739d
)
This commit is contained in:
parent
3b1d71ffd8
commit
9784a470bb
@ -86,7 +86,7 @@ static struct trelay *trelay_find(struct net_device *dev)
|
||||
static int tr_device_event(struct notifier_block *unused, unsigned long event,
|
||||
void *ptr)
|
||||
{
|
||||
struct net_device *dev = ptr;
|
||||
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
||||
struct trelay *tr;
|
||||
|
||||
if (event != NETDEV_UNREGISTER)
|
||||
|
Loading…
Reference in New Issue
Block a user