summaryrefslogtreecommitdiffstats
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2020-11-18 22:40:37 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-19 10:59:19 -0800
commit0530bd6e6a3d5a0292a1a5f33ea980ae7e8b56ca (patch)
tree262be117490f7112e6058e20fcb2af7bdc41e855 /net/smc/af_smc.c
parent2d8f6481c17db9fa5238b277cdbc392084060b09 (diff)
downloadlinux-0530bd6e6a3d5a0292a1a5f33ea980ae7e8b56ca.tar.gz
linux-0530bd6e6a3d5a0292a1a5f33ea980ae7e8b56ca.tar.bz2
linux-0530bd6e6a3d5a0292a1a5f33ea980ae7e8b56ca.zip
net/smc: fix matching of existing link groups
With the multi-subnet support of SMC-Dv2 the match for existing link groups should not include the vlanid of the network device. Set ini->smcd_version accordingly before the call to smc_conn_create() and use this value in smc_conn_create() to skip the vlanid check. Fixes: 5c21c4ccafe8 ("net/smc: determine accepted ISM devices") Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r--net/smc/af_smc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index e9f487c8c6d5..5dd4faaf7d6e 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -979,7 +979,8 @@ static int __smc_connect(struct smc_sock *smc)
/* check if smc modes and versions of CLC proposal and accept match */
rc = smc_connect_check_aclc(ini, aclc);
- version = aclc->hdr.version == SMC_V1 ? SMC_V1 : version;
+ version = aclc->hdr.version == SMC_V1 ? SMC_V1 : SMC_V2;
+ ini->smcd_version = version;
if (rc)
goto vlan_cleanup;