OSDN Git Service

net/smc: tolerate future SMCD versions
authorUrsula Braun <ubraun@linux.ibm.com>
Wed, 8 Jul 2020 15:05:15 +0000 (17:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2020 19:35:15 +0000 (12:35 -0700)
commitfb4f79264c0fc6fd5a68ffe3e31bfff97311e1f1
tree2aaec43150c7273cedf19469c011ee52148ac4a6
parent82087c0330534d18e6db25869871e589d214b7fa
net/smc: tolerate future SMCD versions

CLC proposal messages of future SMCD versions could be larger than SMCD
V1 CLC proposal messages.
To enable toleration in SMC V1 the receival of CLC proposal messages
is adapted:
* accept larger length values in CLC proposal
* check trailing eye catcher for incoming CLC proposal with V1 length only
* receive the whole CLC proposal even in cases it does not fit into the
  V1 buffer

Fixes: e7b7a64a8493d ("smc: support variable CLC proposal messages")
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_clc.c
net/smc/smc_clc.h