Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756647Ab1BRNRF (ORCPT ); Fri, 18 Feb 2011 08:17:05 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:46018 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292Ab1BRNRD convert rfc822-to-8bit (ORCPT ); Fri, 18 Feb 2011 08:17:03 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=cKDy30PMHp4jxSAm7qfKIa42y275IAuzQyRTIbrP3d67/s8E8FoNSNPSGwyf3hAXuG FNj+q92WdoE+3u4lDyhuO0lJ4X+o5Nerv2m7GjkUX5/UkuD6d3sFgP3t1mPE1uMEnDAr tkKKSPlSnvobEg5DUvekGJGh289O1IYZ+bMPo= MIME-Version: 1.0 In-Reply-To: <1298023023.2595.170.camel@edumazet-laptop> References: <20110218050321.10415.qmail@science.horizon.com> <1298010735.2642.9.camel@edumazet-laptop> <1298023023.2595.170.camel@edumazet-laptop> From: Changli Gao Date: Fri, 18 Feb 2011 21:16:42 +0800 Message-ID: Subject: Re: [PATCH] net: Add default_advmss() methods to blackhole dst_ops To: Eric Dumazet Cc: George Spelvin , David Miller , linux-kernel@vger.kernel.org, netdev , Roland Dreier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1592 Lines: 51 On Fri, Feb 18, 2011 at 5:57 PM, Eric Dumazet wrote: > > > I suspect following patch is needed > > CC Roland Dreier because he fixed the > default_mtu problem in commit ec831ea72ee5d7d47 > (net: Add default_mtu() methods to blackhole dst_ops) > > Thanks ! > > [PATCH] net: Add default_advmss() methods to blackhole dst_ops > > Commit 0dbaee3b37e118a (net: Abstract default ADVMSS behind an > accessor.) introduced a possible crash in tcp_connect_init(), when > dst->default_advmss() is called from dst_metric_advmss() > > Reported-by: George Spelvin > Signed-off-by: Eric Dumazet > CC: Roland Dreier > --- > ?net/ipv4/route.c | ? ?7 +++++++ > ?net/ipv6/route.c | ? ?6 ++++++ > ?2 files changed, 13 insertions(+) > > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > index 788a3e7..5edb605 100644 > --- a/net/ipv4/route.c > +++ b/net/ipv4/route.c > @@ -2712,6 +2712,12 @@ static unsigned int ipv4_blackhole_default_mtu(const struct dst_entry *dst) > ? ? ? ?return 0; > ?} > > +static unsigned int ipv4_blackhole_default_advmss(const struct dst_entry *dst) > +{ > + ? ? ? return 256; > +} > + > + I am wondering why magic number 256 is used here. Is there a special reason? Thanks. -- Regards, Changli Gao(xiaosuo@gmail.com) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/