aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLidong Zhong <lzhong@suse.com>2014-06-12 10:26:14 -0500
committerJiri Slaby <jslaby@suse.cz>2014-06-27 10:25:24 +0200
commit34b6c0490bfa372876e6907eee779c5cd0e89963 (patch)
treeb76b95b01ed9ff6f598e365f64e5b68b159eba82 /fs
parent9bf37c057d11c6a483a787965bb585e9ab5fa6ab (diff)
dlm: keep listening connection alive with sctp mode
commit 883854c5457a97190f7b0ee20f03bcd9664fc0c2 upstream. 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> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs')
-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 a5e34dd6a32c..1381d3fb3738 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,
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) {