From mboxrd@z Thu Jan 1 00:00:00 1970 From: Satoru SATOH Subject: Re: [PATCH][IP] Make use of the inline function dst_metric_locked() Date: Wed, 30 Apr 2008 11:53:31 +0900 Message-ID: <4817DF2B.1080701@gmail.com> References: <4817C8F5.7060101@gmail.com> <20080429.182443.154118887.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: netdev@vger.kernel.org Return-path: Received: from mx1.redhat.com ([66.187.233.31]:41319 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754848AbYD3C4o (ORCPT ); Tue, 29 Apr 2008 22:56:44 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m3U2ugjC027912 for ; Tue, 29 Apr 2008 22:56:42 -0400 Received: from pobox.nrt.redhat.com (pobox.nrt.redhat.com [10.64.255.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3U2ufKD008818 for ; Tue, 29 Apr 2008 22:56:42 -0400 Received: from gescom.nrt.redhat.com (vpn-198-9.nrt.redhat.com [10.64.198.9]) by pobox.nrt.redhat.com (8.13.1/8.13.1) with ESMTP id m3U2ueWk021795 for ; Wed, 30 Apr 2008 11:56:40 +0900 In-Reply-To: <20080429.182443.154118887.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: # Resend it. I think it fixed. I found some parts inline function dst_metric_locked should be used but not. The following patch fixes these. Signed-off-by: Satoru SATOH include/net/ip.h | 2 +- net/ipv4/route.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/ip.h b/include/net/ip.h index 6d7bcd5..3b40bc2 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) { return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && - !(dst_metric(dst, RTAX_LOCK)&(1<u.dst.metrics)); if (fi->fib_mtu == 0) { rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu; - if (rt->u.dst.metrics[RTAX_LOCK-1] & (1 << RTAX_MTU) && + if (dst_metric_locked(&rt->u.dst, RTAX_MTU) && rt->rt_gateway != rt->rt_dst && rt->u.dst.dev->mtu > 576) rt->u.dst.metrics[RTAX_MTU-1] = 576;