]> git.ipfire.org Git - thirdparty/iproute2.git/commit
Fix regression with 'ip address show'
authorMike Frysinger <vapier@gentoo.org>
Mon, 13 Aug 2012 15:09:52 +0000 (08:09 -0700)
committerStephen Hemminger <shemminger@vyatta.com>
Mon, 13 Aug 2012 15:09:52 +0000 (08:09 -0700)
commitaf9d406f99853848054162ed7aefbe71dc03e433
treeb7e1e328b5057bf572560f9852140f95f8710786
parent6d10827c792445ac0b00aadab0a76cac7db2b84a
Fix regression with 'ip address show'

`ip a s` no longer shows addresses since 3.4.0 works, but 3.5.0,

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 forever

but 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.
ip/ipaddress.c