From: Patrick McHardy Date: Tue, 13 Nov 2007 08:13:37 +0000 (-0800) Subject: Fix SET_VLAN_INGRESS_PRIORITY_CMD error return. X-Git-Tag: v2.6.23.4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9def747b654622c8ce0936ccb0f4670f978c138e;p=thirdparty%2Fkernel%2Fstable.git Fix SET_VLAN_INGRESS_PRIORITY_CMD error return. patch fffe470a803e7f7b74c016291e542a0162761209 in mainline. [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl Based on report and patch by Doug Kehn : 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 327ff81ebbd7c..ef3f789823284 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -744,6 +744,7 @@ static int vlan_ioctl_handler(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: