Commit 650b2a84 authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

sctp: check pl.raise_count separately from its increment



As Marcelo's suggestion this will make code more clear to read.

Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a3c680a
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -335,12 +335,15 @@ void sctp_transport_pl_recv(struct sctp_transport *t)
			t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
			sctp_assoc_sync_pmtu(t->asoc);
		}
	} else if (t->pl.state == SCTP_PL_COMPLETE && ++t->pl.raise_count == 30) {
	} else if (t->pl.state == SCTP_PL_COMPLETE) {
		t->pl.raise_count++;
		if (t->pl.raise_count == 30) {
			/* Raise probe_size again after 30 * interval in Search Complete */
			t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */
			t->pl.probe_size += SCTP_PL_MIN_STEP;
		}
	}
}

static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu)
{