From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Comolli Subject: Re: [PATCH] iproute2: dont filter cached routes on iproute_get Date: Thu, 12 Aug 2010 20:58:56 +0200 Message-ID: References: <20100808193304.GA15380@amd64.fatal.se> <1281297165.4116.19.camel@amd64.fatal.se> <20100812090519.GA13769@babylon> <4C63BCED.5000209@astaro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andreas Henriksson , shemminger@vyatta.com, netdev@vger.kernel.org To: Ulrich Weber Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:57042 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759Ab0HLS67 convert rfc822-to-8bit (ORCPT ); Thu, 12 Aug 2010 14:58:59 -0400 Received: by bwz3 with SMTP id 3so1132830bwz.19 for ; Thu, 12 Aug 2010 11:58:56 -0700 (PDT) In-Reply-To: <4C63BCED.5000209@astaro.com> Sender: netdev-owner@vger.kernel.org List-ID: Works for me (for ipv4, I cannot test ipv6). You can add my Tested-By in case you need it. Regards, =46abio On Thu, Aug 12, 2010 at 11:20 AM, Ulrich Weber wrot= e: > The patch should be applied on top of iproute2 v2.6.35. > > Cheers > =C2=A0Ulrich > > On 08/12/2010 11:12 AM, Fabio Comolli wrote: >> Hi. >> Is this patch supposed to be applied on top of plain iproute2 v2.6.3= 5 >> or on top of the previous Andreas' patch? >> >> >> >> On Thu, Aug 12, 2010 at 11:05 AM, Ulrich Weber w= rote: >>> iproute_get will return cloned routes for IPv4 >>> and cloned as well non-cloned routes for IPv6. >>> >>> Therefore RTM_F_CLONED flag should not be checked >>> for iproute_get routes. Check in print_route will >>> always fail because valid values are 0 and 1. >>> >>> Signed-off-by: Ulrich Weber >>> --- >>> =C2=A0ip/iproute.c | =C2=A0 =C2=A01 + >>> =C2=A01 files changed, 1 insertions(+), 0 deletions(-) >>> >>> diff --git a/ip/iproute.c b/ip/iproute.c >>> index 711576e..b43933c 100644 >>> --- a/ip/iproute.c >>> +++ b/ip/iproute.c >>> @@ -1286,6 +1286,7 @@ int iproute_get(int argc, char **argv) >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0memset(&req, 0, sizeof(req)); >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0iproute_reset_filter(); >>> + =C2=A0 =C2=A0 =C2=A0 filter.cloned =3D 2; >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0req.n.nlmsg_len =3D NLMSG_LENGTH(sizeof(= struct rtmsg)); >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0req.n.nlmsg_flags =3D NLM_F_REQUEST; >>> -- >>> 1.7.0.4 >>> >>> > > > -- > Ulrich Weber | uweber@astaro.com | Software Engineer > Astaro GmbH & Co. KG | www.astaro.com | Phone +49-721-25516-0 | Fax =E2= =80=93200 > An der RaumFabrik 33a | 76227 Karlsruhe | Germany >