* [PATCH] net/tun: Call notifiers before and after changing device type
@ 2020-11-16 7:44 Martin Schiller
0 siblings, 0 replies; only message in thread
From: Martin Schiller @ 2020-11-16 7:44 UTC (permalink / raw)
To: davem, kuba; +Cc: netdev, linux-kernel, Martin Schiller
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
---
drivers/net/tun.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index be69d272052f..8253c5b03105 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -3124,9 +3124,11 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
"Linktype set failed because interface is up\n");
ret = -EBUSY;
} else {
+ call_netdevice_notifiers(NETDEV_PRE_TYPE_CHANGE, tun->dev);
tun->dev->type = (int) arg;
netif_info(tun, drv, tun->dev, "linktype set to %d\n",
tun->dev->type);
+ call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, tun->dev);
ret = 0;
}
break;
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-16 7:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 7:44 [PATCH] net/tun: Call notifiers before and after changing device type Martin Schiller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.