From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Gora Subject: [PATCH] kni: return failure for all ioctls Date: Thu, 13 Sep 2018 18:46:52 -0300 Message-ID: <20180913214652.20771-1-dg@adax.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Dan Gora , Ferruh Yigit To: dev@dpdk.org Return-path: Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 77E415F51 for ; Thu, 13 Sep 2018 23:47:08 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id d131-v6so4077476qke.11 for ; Thu, 13 Sep 2018 14:47:08 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 fea3ec7e7..f94f2abaf 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -600,7 +600,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.19.0