Skip to content

Commit 91bd6b1

Browse files
Wei Yongjundavem330
authored andcommitted
sctp: Drop ICMP packet too big message with MTU larger than current PMTU
If ICMP packet too big message is received with MTU larger than current PMTU, SCTP will still accept this ICMP message and sync the PMTU of assoc with the wrong MTU. Endpoing A Endpoint B (ESTABLISHED) (ESTABLISHED) ICMP ---------> (packet too big, MTU too larger) sync PMTU This patch fixed the problem by drop that ICMP message. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent dcc5141 commit 91bd6b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/sctp/input.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
369369
void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
370370
struct sctp_transport *t, __u32 pmtu)
371371
{
372-
if (!t || (t->pathmtu == pmtu))
372+
if (!t || (t->pathmtu <= pmtu))
373373
return;
374374

375375
if (sock_owned_by_user(sk)) {

0 commit comments

Comments
 (0)