diff options
author | Patrick McHardy <kaber@trash.net> | 2007-11-07 04:31:32 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-11-07 07:15:02 -0500 |
commit | fffe470a803e7f7b74c016291e542a0162761209 (patch) | |
tree | 8af6b1ed01c4a98bcd6fae935f04d93c07ed7a90 /net/8021q | |
parent | 45a19b0a725a04f3255d9d3da1fca30bb97f1481 (diff) |
[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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | 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 3fe4fc86055f..1037748c14db 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) | |||
747 | vlan_dev_set_ingress_priority(dev, | 747 | vlan_dev_set_ingress_priority(dev, |
748 | args.u.skb_priority, | 748 | args.u.skb_priority, |
749 | args.vlan_qos); | 749 | args.vlan_qos); |
750 | err = 0; | ||
750 | break; | 751 | break; |
751 | 752 | ||
752 | case SET_VLAN_EGRESS_PRIORITY_CMD: | 753 | case SET_VLAN_EGRESS_PRIORITY_CMD: |