bonding: set correct vlan id for alb xmit path
authordingtianhong <dingtianhong@huawei.com>
Wed, 12 Mar 2014 09:31:59 +0000 (17:31 +0800)
committerJiri Slaby <jslaby@suse.cz>
Fri, 18 Apr 2014 09:07:04 +0000 (11:07 +0200)
commit3f6f4a798fddeb5702de262e708ff7bddadb67fd
treeeab147d55b4d86966fbc8fa19d931880e0405b14
parent21ddf0c09da76adf3d4a66473cf01bc1b428453d
bonding: set correct vlan id for alb xmit path

[ Upstream commit fb00bc2e6cd2046282ba4b03f4fe682aee70b2f8 ]

The commit d3ab3ffd1d728d7ee77340e7e7e2c7cfe6a4013e
(bonding: use rlb_client_info->vlan_id instead of ->tag)
remove the rlb_client_info->tag, but occur some issues,
The vlan_get_tag() will return 0 for success and -EINVAL for
error, so the client_info->vlan_id always be set to 0 if the
vlan_get_tag return 0 for success, so the client_info would
never get a correct vlan id.

We should only set the vlan id to 0 when the vlan_get_tag return error.

Fixes: d3ab3ffd1d7 (bonding: use rlb_client_info->vlan_id instead of ->tag)

CC: Ding Tianhong <dingtianhong@huawei.com>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Acked-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/bonding/bond_alb.c