From: Lidong Zhong Date: Thu, 12 Jun 2014 15:26:14 +0000 (-0500) Subject: dlm: keep listening connection alive with sctp mode X-Git-Tag: firefly_0821_release~176^2~3751^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=883854c5457a97190f7b0ee20f03bcd9664fc0c2;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: David Teigland --- 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, 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) {