chiark / gitweb /
networkd: don't check for ifindex in answer to RTM_NEWLINK
authorTom Gundersen <teg@jklm.no>
Fri, 31 Jan 2014 01:03:39 +0000 (02:03 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 31 Jan 2014 11:20:34 +0000 (12:20 +0100)
The kernel will not be changed to support this, so drop the code. Listening
for all RTM_NEWLINK messages and filtering on name is reliable, so it is not
a problem.

src/network/networkd-netdev.c

index c0f3df5..c48c96a 100644 (file)
@@ -152,14 +152,6 @@ static int netdev_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
                 return 1;
         }
 
-        r = sd_rtnl_message_link_get_ifindex(m, &ifindex);
-        if (r < 0)
-                log_warning_netdev(netdev, "created netdev with unknown ifindex: %s", strerror(-r));
-        else {
-                log_info_netdev(netdev, "created netdev with ifindex %d", ifindex);
-                netdev_set_ifindex(netdev, ifindex);
-        }
-
         return 1;
 }