iproute2-3.5.0: `ip a s` no longer shows addresses
Subsystems (2)
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: <LOOPBACK,UP,LOWER_UP> 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 foreverbut after, i now get:
1: lo: <LOOPBACK,UP,LOWER_UP> 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
ip/ipaddress.c +1 -1
@@ -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 ;
Quoted 37 lines · On Tue, 7 Aug 2012 15:03:00 -0400 Mike Frysinger <[email protected]> wrote:
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=8d07e5f7d995171ee8834eae268e300560de5d4fthe simple test case:
make clean && make -j -s && ./ip/ip a s lobefore that change, i would get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWNlink/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 foreverbut after, i now get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWNlink/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00seems like the bug was introduced in the middle of that patch:
(quoted diff) +4
-1- 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 sworks for me again. (see below)(quoted diff) +0
-1-mikeip/ipaddress.c +0
-0
ip/ipaddress.c static int ipaddr_list_or_flush(int argc, char **argv, int flush) · line 1024
Quoted 8 lines
ip/ipaddress.c +1
-1@@ -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 ;
Ok. Applied