]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: set correct vlan id for alb xmit path
authordingtianhong <dingtianhong@huawei.com>
Wed, 12 Mar 2014 09:31:59 +0000 (17:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Mar 2014 19:45:10 +0000 (15:45 -0400)
commit6a6288777ae7d083c45077eade1e1ef175f05f4e
treeed8dba22d85be0abf16589af0b564b4c06bb59fc
parenta3b95db70c095d2ec37f7670342a5efa69bcbca0
bonding: set correct vlan id for alb xmit path

The commit 4df13ba82a57e985dbd343350e3e4f7baa1f9f0f
(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: 4df13ba82a5 (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>
drivers/net/bonding/bond_alb.c