Skip to content

Commit 369537c

Browse files
Ursula Braundavem330
authored andcommitted
net/smc: no peer ID in CLC decline for SMCD
Just SMCR requires a CLC Peer ID, but not SMCD. The field should be zero for SMCD. Fixes: c758dfd ("net/smc: add SMC-D support in CLC messages") Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Karsten Graul <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 67f562e commit 369537c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/smc/smc_clc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info)
372372
dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline));
373373
dclc.hdr.version = SMC_CLC_V1;
374374
dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0;
375-
memcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid));
375+
if (smc->conn.lgr && !smc->conn.lgr->is_smcd)
376+
memcpy(dclc.id_for_peer, local_systemid,
377+
sizeof(local_systemid));
376378
dclc.peer_diagnosis = htonl(peer_diag_info);
377379
memcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER));
378380

0 commit comments

Comments
 (0)