From owner-freebsd-net@FreeBSD.ORG Wed Jul 11 21:57:31 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 395C9106564A; Wed, 11 Jul 2012 21:57:31 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0442B8FC08; Wed, 11 Jul 2012 21:57:30 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2944313pbb.13 for ; Wed, 11 Jul 2012 14:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7jPWbZ3elujSuvZtHUxoh8MnkO7EmIA0Z5r2deVsstA=; b=c3HW2bqTMLhqCP6ysEjx8dbTDNV4tJjx67aDTeLrkhh7yK2Rje2GfyvGNCf1qggD2f qjxHOZchfT1w5rcuDzONN2/uOY0R1abKiTLQVPzHYcWSiAZ+npNeO83TbHfIZ8cuD5fL ijAPVsEzPA2YmA2toGTmIPIKhwr6+wUvEP2Ph9j0nK/rLCgQT2XO337KkNgW0FgUawyi vb5NtGXpK3Rodm76MUAi+oC0HWNrMrLaEFlK8B1faGpw/kGlMvfMUrQFacsrZNDP3Kle 2gGo/SV+u4Pi7JP30w1tZQyAh4hTA7gX10dKClE9hJXP6KjHGumSPSeYZHigi4eNbZ7t VFfQ== Received: by 10.68.226.137 with SMTP id rs9mr80812137pbc.114.1342043850546; Wed, 11 Jul 2012 14:57:30 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPS id jv6sm2439377pbc.40.2012.07.11.14.57.28 (version=SSLv3 cipher=OTHER); Wed, 11 Jul 2012 14:57:29 -0700 (PDT) Sender: Navdeep Parhar Message-ID: <4FFDF6C7.3030301@FreeBSD.org> Date: Wed, 11 Jul 2012 14:57:27 -0700 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120705 Thunderbird/13.0.1 MIME-Version: 1.0 To: gnn@freebsd.org References: <86liiqrnnq.wl%gnn@neville-neil.com> In-Reply-To: <86liiqrnnq.wl%gnn@neville-neil.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org Subject: Re: Interface MTU question... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2012 21:57:31 -0000 On 07/11/12 14:30, gnn@freebsd.org wrote: > Howdy, > > Does anyone know the reason for this particular check in > ip_output.c? > > if (rte != NULL && (rte->rt_flags & (RTF_UP|RTF_HOST))) { > /* > * This case can happen if the user changed the MTU > * of an interface after enabling IP on it. Because > * most netifs don't keep track of routes pointing to > * them, there is no way for one to update all its > * routes when the MTU is changed. > */ > if (rte->rt_rmx.rmx_mtu > ifp->if_mtu) > rte->rt_rmx.rmx_mtu = ifp->if_mtu; > mtu = rte->rt_rmx.rmx_mtu; > } else { > mtu = ifp->if_mtu; > } > > To my mind the > ought to be != so that any change, up or down, of the > interface MTU is eventually reflected in the route. Also, this code > does not check if it is both a HOST route and UP, but only if it is > one other the other, so don't be fooled by that, this check happens > for any route we have if it's up. I believe rmx_mtu could be low due to some intermediate node between this host and the final destination. An increase in the MTU of the local interface should not increase the path MTU if the limit was due to someone else along the route. Regards, Navdeep > > My proposed change is this: > > Index: ip_output.c > =================================================================== > --- ip_output.c (revision 225561) > +++ ip_output.c (working copy) > @@ -320,7 +320,7 @@ > * them, there is no way for one to update all its > * routes when the MTU is changed. > */ > - if (rte->rt_rmx.rmx_mtu > ifp->if_mtu) > + if (rte->rt_rmx.rmx_mtu != ifp->if_mtu) > rte->rt_rmx.rmx_mtu = ifp->if_mtu; > mtu = rte->rt_rmx.rmx_mtu; > } else { > > Please let me know what y'all think. > > Best, > George > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >