Skip to content

Commit 02dc2ee

Browse files
lxindavem330
authored andcommitted
sctp: do not update transport pathmtu if SPP_PMTUD_ENABLE is not set
Currently, in sctp_packet_config(), sctp_transport_pmtu_check() is called to update transport pathmtu with dst's mtu when dst's mtu has been changed by non sctp stack like xfrm. However, this should only happen when SPP_PMTUD_ENABLE is set, no matter where dst's mtu changed. This patch is to fix by checking SPP_PMTUD_ENABLE flag before calling sctp_transport_pmtu_check(). Thanks Jacek for reporting and looking into this issue. v1->v2: - add the missing "{" to fix the build error. Fixes: 69fec32 ('Revert "sctp: remove sctp_transport_pmtu_check"') Reported-by: Jacek Szafraniec <[email protected]> Tested-by: Jacek Szafraniec <[email protected]> Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 161dcc0 commit 02dc2ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sctp/output.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ void sctp_packet_config(struct sctp_packet *packet, __u32 vtag,
104104
if (asoc->param_flags & SPP_PMTUD_ENABLE)
105105
sctp_assoc_sync_pmtu(asoc);
106106
} else if (!sctp_transport_pl_enabled(tp) &&
107-
!sctp_transport_pmtu_check(tp)) {
108-
if (asoc->param_flags & SPP_PMTUD_ENABLE)
107+
asoc->param_flags & SPP_PMTUD_ENABLE) {
108+
if (!sctp_transport_pmtu_check(tp))
109109
sctp_assoc_sync_pmtu(asoc);
110110
}
111111

0 commit comments

Comments
 (0)