aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLidong Zhong <lzhong@suse.com>2014-06-12 11:26:14 -0400
committerDavid Teigland <teigland@redhat.com>2014-06-12 11:26:14 -0400
commit883854c5457a97190f7b0ee20f03bcd9664fc0c2 (patch)
treef0ec6e389dbef69b53fcced714a5f82ae0301bd7
parent5c02c392cd2320e8d612376d6b72b6548a680923 (diff)
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>
-rw-r--r--fs/dlm/lowcomms.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 1e5b45359509..d08e079ea5d3 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -617,6 +617,11 @@ static void retry_failed_sctp_send(struct connection *recv_con,
617 int nodeid = sn_send_failed->ssf_info.sinfo_ppid; 617 int nodeid = sn_send_failed->ssf_info.sinfo_ppid;
618 618
619 log_print("Retry sending %d bytes to node id %d", len, nodeid); 619 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 }
620 625
621 con = nodeid2con(nodeid, 0); 626 con = nodeid2con(nodeid, 0);
622 if (!con) { 627 if (!con) {