From: Wei Yongjun Date: Thu, 23 Oct 2008 07:59:52 +0000 (-0700) Subject: sctp: Drop ICMP packet too big message with MTU larger than current PMTU X-Git-Tag: upstream/snapshot3+hdmi~21799^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91bd6b1e030266cf87d3f567b49f0fa60a7318ba;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Vlad Yasevich Signed-off-by: David S. Miller --- diff --git a/net/sctp/input.c b/net/sctp/input.c index a49fa80..bf612d9 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -369,7 +369,7 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb) void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, struct sctp_transport *t, __u32 pmtu) { - if (!t || (t->pathmtu == pmtu)) + if (!t || (t->pathmtu <= pmtu)) return; if (sock_owned_by_user(sk)) {