Skip to content

Commit

Permalink
dlm: keep listening connection alive with sctp mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Lidong Zhong authored and teigland committed Jun 12, 2014
1 parent 5c02c39 commit 883854c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,11 @@ static void retry_failed_sctp_send(struct connection *recv_con,
int nodeid = sn_send_failed->ssf_info.sinfo_ppid;

log_print("Retry sending %d bytes to node id %d", len, nodeid);

if (!nodeid) {
log_print("Shouldn't resend data via listening connection.");
return;
}

con = nodeid2con(nodeid, 0);
if (!con) {
Expand Down

0 comments on commit 883854c

Please sign in to comment.