netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
@ 2007-11-03 12:24 Patrick McHardy
  2007-11-07  9:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2007-11-03 12:24 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List, Doug Kehn

[-- 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:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-07  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-03 12:24 [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl Patrick McHardy
2007-11-07  9:31 ` David Miller

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).