Skip to content

Commit 883854c

Browse files
Lidong Zhongteigland
authored andcommitted
dlm: keep listening connection alive with sctp mode
The connection struct with nodeid 0 is the listening socket, not a connection to another node. The sctp resend function was not checking that the nodeid was valid (non-zero), so it would mistakenly get and resend on the listening connection when nodeid was zero. Signed-off-by: Lidong Zhong <lzhong@suse.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 5c02c39 commit 883854c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/dlm/lowcomms.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@ static void retry_failed_sctp_send(struct connection *recv_con,
617617
int nodeid = sn_send_failed->ssf_info.sinfo_ppid;
618618

619619
log_print("Retry sending %d bytes to node id %d", len, nodeid);
620+
621+
if (!nodeid) {
622+
log_print("Shouldn't resend data via listening connection.");
623+
return;
624+
}
620625

621626
con = nodeid2con(nodeid, 0);
622627
if (!con) {

0 commit comments

Comments
 (0)