Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "sctp: remove sctp_transport_pmtu_check"

This reverts commit 22d7be267eaa8114dcc28d66c1c347f667d7878a.

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: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Xin Long and committed by
David S. Miller
69fec325 cc3ccf26

+15
+12
include/net/sctp/sctp.h
··· 608 608 SCTP_DEFAULT_MINSEGMENT)); 609 609 } 610 610 611 + static inline bool sctp_transport_pmtu_check(struct sctp_transport *t) 612 + { 613 + __u32 pmtu = sctp_dst_mtu(t->dst); 614 + 615 + if (t->pathmtu == pmtu) 616 + return true; 617 + 618 + t->pathmtu = pmtu; 619 + 620 + return false; 621 + } 622 + 611 623 #endif /* __net_sctp_h__ */
+3
net/sctp/output.c
··· 118 118 sctp_transport_route(tp, NULL, sp); 119 119 if (asoc->param_flags & SPP_PMTUD_ENABLE) 120 120 sctp_assoc_sync_pmtu(asoc); 121 + } else if (!sctp_transport_pmtu_check(tp)) { 122 + if (asoc->param_flags & SPP_PMTUD_ENABLE) 123 + sctp_assoc_sync_pmtu(asoc); 121 124 } 122 125 123 126 if (asoc->pmtu_pending) {