From patchwork Sun Aug 8 19:33:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Henriksson X-Patchwork-Id: 61228 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BE3E9B6EEF for ; Mon, 9 Aug 2010 05:24:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754633Ab0HHTYj (ORCPT ); Sun, 8 Aug 2010 15:24:39 -0400 Received: from smtprelay-h31.telenor.se ([213.150.131.4]:55632 "EHLO smtprelay-h31.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754440Ab0HHTYi (ORCPT ); Sun, 8 Aug 2010 15:24:38 -0400 Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 5F1B4EB5AA for ; Sun, 8 Aug 2010 21:24:36 +0200 (CEST) X-SENDER-IP: [85.225.138.33] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsouAKehXkxV4YohPGdsb2JhbACgQwwBAQEBNS3AJYU6BIk7 X-IronPort-AV: E=Sophos;i="4.55,338,1278280800"; d="scan'208";a="116884548" Received: from c-218ae155.447-1-64736c11.cust.bredbandsbolaget.se (HELO amd64.fatal.se) ([85.225.138.33]) by ipb1.telenor.se with ESMTP; 08 Aug 2010 21:24:36 +0200 Received: from gem by amd64.fatal.se with local (Exim 4.72) (envelope-from ) id 1OiBcG-00040t-9c; Sun, 08 Aug 2010 21:33:04 +0200 Date: Sun, 8 Aug 2010 21:33:04 +0200 From: Andreas Henriksson To: Fabio Comolli , Ulrich Weber Cc: netdev@vger.kernel.org Subject: Re: Latest iproute2 breaks "ip route get" command Message-ID: <20100808193304.GA15380@amd64.fatal.se> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > The following logs should explain the problem. In short, the "ip route > get" command with iproute2 v. 2.6.35 does not output anything (and > exits with a 0). This breaks (for example) vpnc. Seems to be caused by: http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commitdiff;h=447928279c88b6581ae4cdc1b5ac0a9e755aff64 Have no idea if this is the correct fix, but it seemed like a likely typo based on the changes in the above commit and that this brings the output back: (PS. Sorry for not properly replying in thread, but todays mailing list archives seems to be extremely afraid of exposing any real mail headers making it hard to reply properly without having received the original mail.) diff --git a/ip/iproute.c b/ip/iproute.c index 711576e..86c7ab7 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -160,7 +160,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) if (r->rtm_family == AF_INET6 && table != RT_TABLE_MAIN) ip6_multiple_tables = 1; - if (filter.cloned == !(r->rtm_flags&RTM_F_CLONED)) + if (filter.cloned && !(r->rtm_flags&RTM_F_CLONED)) return 0; if (r->rtm_family == AF_INET6 && !ip6_multiple_tables) {