Skip to content

Commit

Permalink
[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Nov 7, 2007
1 parent 45a19b0 commit fffe470
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fffe470

Please sign in to comment.