From 12ce2da88f032efb7bf2e3ed4e1037f220869251 Mon Sep 17 00:00:00 2001 From: Dan Gora Date: Thu, 13 Sep 2018 18:46:52 -0300 Subject: [PATCH] kni: return failure for all ioctls Modify kni_net_ioctl() to return -EOPNOTSUPP for all ioctls instead of 0. This is necessary because the Wicked (and possibly other) network interface managers will perform the SIOCGIWNAME ioctl to check if the interface is a wireless interface. If the KNI module returns success, Wicked will incorrectly interpret the interface as a wireless interface. Signed-off-by: Dan Gora Acked-by: Ferruh Yigit --- kernel/linux/kni/kni_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 7fcfa106cb..3a542d7379 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -597,7 +597,7 @@ kni_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) pr_debug("kni_net_ioctl group:%d cmd:%d\n", ((struct kni_dev *)netdev_priv(dev))->group_id, cmd); - return 0; + return -EOPNOTSUPP; } static void -- 2.20.1