Return-Path: X-Original-To: davem@davemloft.net Delivered-To: davem@davemloft.net Received: from g5t0008.atlanta.hp.com (g5t0008.atlanta.hp.com [15.192.0.45]) by sunset.davemloft.net (Postfix) with ESMTP id B6A09C8C192 for ; Tue, 21 Oct 2008 19:08:29 -0700 (PDT) Received: from smtp2.fc.hp.com (smtp.cnd.hp.com [15.11.136.114]) by g5t0008.atlanta.hp.com (Postfix) with ESMTP id 7C98524554; Wed, 22 Oct 2008 02:08:50 +0000 (UTC) Received: from localhost.localdomain (squirrel.fc.hp.com [15.11.146.57]) by smtp2.fc.hp.com (Postfix) with ESMTP id 3B1CC2892FA; Wed, 22 Oct 2008 01:55:45 +0000 (UTC) From: Vlad Yasevich To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, Wei Yongjun , Vlad Yasevich Subject: [PATCH 1/4] sctp: Drop ICMP packet too big message with MTU larger than current PMTU Date: Tue, 21 Oct 2008 22:08:44 -0400 Message-Id: <1224641327-11913-2-git-send-email-vladislav.yasevich@hp.com> X-Mailer: git-send-email 1.5.3.5 In-Reply-To: <1224641327-11913-1-git-send-email-vladislav.yasevich@hp.com> References: <1224641327-11913-1-git-send-email-vladislav.yasevich@hp.com> From: Wei Yongjun 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 --- net/sctp/input.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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)) { -- 1.5.3.5