Skip to contentSkip to conversation

: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl

VLAN Applied Patrick McHardy 2 participants 2 messages Nov 3, 2007 – Nov 7, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl

Based on report and patch by Doug Kehn <[email protected]>:

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.

---
commit db0d1d928ecdbd1a0c3f6d806c84b4f28a7af0e4
tree 4103b5a3a2dfa353cc4f1617729983650cfdd61a
parent 3743b5898464963ad2b169e3f487205b12fef472
author Patrick McHardy <[email protected]> Fri, 02 Nov 2007 18:59:39 +0100 committer Patrick McHardy <[email protected]> Fri, 02 Nov 2007 18:59:39 +0100

 net/8021q/vlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/8021q/vlan.c +1 -0
index 3fe4fc8..1037748 100644
@@ -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:
maintainer Applied
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Sat, 03 Nov 2007 13:24:34 +0100

Quoted 1 line

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

Applied, and I'll queue it up for -stable, thanks!