DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dan Gora <dg@adax.com>
To: dev@dpdk.org
Cc: Dan Gora <dg@adax.com>, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH] kni: return failure for all ioctls
Date: Thu, 13 Sep 2018 18:46:52 -0300	[thread overview]
Message-ID: <20180913214652.20771-1-dg@adax.com> (raw)

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 <dg@adax.com>
---
 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

             reply	other threads:[~2018-09-13 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 21:46 Dan Gora [this message]
2018-09-18 16:19 ` Ferruh Yigit
2018-10-02 15:55   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180913214652.20771-1-dg@adax.com \
    --to=dg@adax.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).