]> git.baikalelectronics.ru Git - kernel.git/commit
[VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl
authorPatrick McHardy <kaber@trash.net>
Wed, 7 Nov 2007 09:31:32 +0000 (01:31 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 7 Nov 2007 12:15:02 +0000 (04:15 -0800)
commitbe66b56313e9ccdda403023f41960c534d24a416
tree8af6b1ed01c4a98bcd6fae935f04d93c07ed7a90
parentadf21659f17d8b6147f7508890ec9f0433770b07
[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>
net/8021q/vlan.c