netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>, Doug Kehn <rdkehn@yahoo.com>
Subject: [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
Date: Sat, 03 Nov 2007 13:24:34 +0100	[thread overview]
Message-ID: <472C6882.2070201@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 56 bytes --]

Fix a regression in 2.6.23. Candidate for -stable IMO.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1413 bytes --]

[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl

Based on report and patch by Doug Kehn <rdkehn@yahoo.com>:

vconfig returns the following error when attempting to execute the
set_ingress_map command:

vconfig: socket or ioctl error for set_ingress_map: Operation not permitted

In vlan.c, vlan_ioctl_handler for SET_VLAN_INGRESS_PRIORITY_CMD
sets err = -EPERM and calls vlan_dev_set_ingress_priority.
vlan_dev_set_ingress_priority is a void function so err remains
at -EPERM and results in the vconfig error (even though the ingress
map was set).

Fix by setting err = 0 after the vlan_dev_set_ingress_priority call.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit db0d1d928ecdbd1a0c3f6d806c84b4f28a7af0e4
tree 4103b5a3a2dfa353cc4f1617729983650cfdd61a
parent 3743b5898464963ad2b169e3f487205b12fef472
author Patrick McHardy <kaber@trash.net> Fri, 02 Nov 2007 18:59:39 +0100
committer Patrick McHardy <kaber@trash.net> Fri, 02 Nov 2007 18:59:39 +0100

 net/8021q/vlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3fe4fc8..1037748 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -747,6 +747,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
 		vlan_dev_set_ingress_priority(dev,
 					      args.u.skb_priority,
 					      args.vlan_qos);
+		err = 0;
 		break;
 
 	case SET_VLAN_EGRESS_PRIORITY_CMD:

             reply	other threads:[~2007-11-03 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-03 12:24 Patrick McHardy [this message]
2007-11-07  9:31 ` [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl David Miller

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=472C6882.2070201@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rdkehn@yahoo.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).