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>

authored by Wei Yongjun and committed by David S. Miller 91bd6b1e dcc51417

+1 -1
+1 -1
net/sctp/input.c
··· 369 369 void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, 370 370 struct sctp_transport *t, __u32 pmtu) 371 371 { 372 - if (!t || (t->pathmtu == pmtu)) 372 + if (!t || (t->pathmtu <= pmtu)) 373 373 return; 374 374 375 375 if (sock_owned_by_user(sk)) {