From 598866974c94eecb842291253780274f96b3d919 Mon Sep 17 00:00:00 2001 From: Karsten Graul Date: Fri, 12 Apr 2019 12:57:25 +0200 Subject: net/smc: check for ip prefix and subnet The check for a matching ip prefix and subnet was only done for SMC-R in smc_listen_rdma_check() but not when an SMC-D connection was possible. Rename the function into smc_listen_prfx_check() and move its call to a place where it is called for both SMC variants. And add a new CLC DECLINE reason for the case when the IP prefix or subnet check fails so the reason for the failing SMC connection can be found out more easily. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: David S. Miller --- net/smc/smc_clc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'net/smc/smc_clc.h') diff --git a/net/smc/smc_clc.h b/net/smc/smc_clc.h index 6c94d54e7a67..f251bed2e7d5 100644 --- a/net/smc/smc_clc.h +++ b/net/smc/smc_clc.h @@ -38,6 +38,7 @@ #define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/ #define SMC_CLC_DECL_RMBE_EC 0x03050000 /* peer has eyecatcher in RMBE */ #define SMC_CLC_DECL_OPTUNSUPP 0x03060000 /* fastopen sockopt not supported */ +#define SMC_CLC_DECL_DIFFPREFIX 0x03070000 /* IP prefix / subnet mismatch */ #define SMC_CLC_DECL_SYNCERR 0x04000000 /* synchronization error */ #define SMC_CLC_DECL_PEERDECL 0x05000000 /* peer declined during handshake */ #define SMC_CLC_DECL_INTERR 0x09990000 /* internal error */ -- cgit v1.2.3