Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00497302 authored by Xin Long's avatar Xin Long Committed by Greg Kroah-Hartman
Browse files

Revert "sctp: remove sctp_transport_pmtu_check"



[ Upstream commit 69fec325a64383667b8a35df5d48d6ce52fb2782 ]

This reverts commit 22d7be26.

The dst's mtu in transport can be updated by a non sctp place like
in xfrm where the MTU information didn't get synced between asoc,
transport and dst, so it is still needed to do the pmtu check
in sctp_packet_config.

Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5fa9f2bd
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -608,4 +608,16 @@ static inline __u32 sctp_dst_mtu(const struct dst_entry *dst)
				 SCTP_DEFAULT_MINSEGMENT));
}

static inline bool sctp_transport_pmtu_check(struct sctp_transport *t)
{
	__u32 pmtu = sctp_dst_mtu(t->dst);

	if (t->pathmtu == pmtu)
		return true;

	t->pathmtu = pmtu;

	return false;
}

#endif /* __net_sctp_h__ */
+3 −0
Original line number Diff line number Diff line
@@ -118,6 +118,9 @@ void sctp_packet_config(struct sctp_packet *packet, __u32 vtag,
		sctp_transport_route(tp, NULL, sp);
		if (asoc->param_flags & SPP_PMTUD_ENABLE)
			sctp_assoc_sync_pmtu(asoc);
	} else if (!sctp_transport_pmtu_check(tp)) {
		if (asoc->param_flags & SPP_PMTUD_ENABLE)
			sctp_assoc_sync_pmtu(asoc);
	}

	if (asoc->pmtu_pending) {