From patchwork Tue Aug 7 19:03:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 175768 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 A12C82C00B4 for ; Wed, 8 Aug 2012 05:03:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755667Ab2HGTDC (ORCPT ); Tue, 7 Aug 2012 15:03:02 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:49598 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754641Ab2HGTDB (ORCPT ); Tue, 7 Aug 2012 15:03:01 -0400 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 4CBE51B400F; Tue, 7 Aug 2012 19:03:00 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: Stephen Hemminger Subject: iproute2-3.5.0: `ip a s` no longer shows addresses Date: Tue, 7 Aug 2012 15:03:00 -0400 User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) Cc: netdev@vger.kernel.org MIME-Version: 1.0 Message-Id: <201208071503.01261.vapier@gentoo.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org since 3.4.0 works, but 3.5.0, a quick bisect shows the bad commit: http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commit;h=8d07e5f7d995171ee8834eae268e300560de5d4f the simple test case: make clean && make -j -s && ./ip/ip a s lo before that change, i would get: 1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever but after, i now get: 1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 seems like the bug was introduced in the middle of that patch: - if (filter.family != AF_PACKET) { + if (filter.family && filter.family != AF_PACKET) { + if (filter.oneline) + no_link = 1; + if (rtnl_wilddump_request(&rth, filter.family, RTM_GETADDR) < 0) { perror("Cannot send dump request"); exit(1); if i revert the change to the if statement there, `ip a s` works for me again. (see below) -mike diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 37deda5..69a63b3 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -1018,7 +1018,7 @@ static int ipaddr_list_or_flush(int argc, char **argv, int flush) exit(1); } - if (filter.family && filter.family != AF_PACKET) { + if (filter.family != AF_PACKET) { if (filter.oneline) no_link = 1;