chiark / gitweb /
networkd: netdev - verify that newlink messages has the expected kind
[elogind.git] / src / network / networkd-manager.c
index ea414b1f1e3b5e74f7f0ff90c2a12782c09f5286..684b1c7ad31499d454f5cc5a6f539965173a4a1e 100644 (file)
@@ -312,19 +312,19 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo
 
         r = sd_rtnl_message_link_get_ifindex(message, &ifindex);
         if (r < 0 || ifindex <= 0) {
 
         r = sd_rtnl_message_link_get_ifindex(message, &ifindex);
         if (r < 0 || ifindex <= 0) {
-                log_debug("received RTM_NEWLINK message without valid ifindex");
+                log_warning("received RTM_NEWLINK message without valid ifindex");
                 return 0;
         }
 
         r = sd_rtnl_message_read_string(message, IFLA_IFNAME, &name);
         if (r < 0)
                 return 0;
         }
 
         r = sd_rtnl_message_read_string(message, IFLA_IFNAME, &name);
         if (r < 0)
-                log_debug("received RTM_NEWLINK message without valid IFLA_IFNAME");
+                log_warning("received RTM_NEWLINK message without valid ifname");
         else {
                 NetDev *netdev;
 
                 r = netdev_get(m, name, &netdev);
                 if (r >= 0) {
         else {
                 NetDev *netdev;
 
                 r = netdev_get(m, name, &netdev);
                 if (r >= 0) {
-                        r = netdev_set_ifindex(netdev, ifindex);
+                        r = netdev_set_ifindex(netdev, message);
                         if (r < 0)
                                 log_debug("could not set ifindex of netdev '%s' to %d: %s",
                                           name, ifindex, strerror(-r));
                         if (r < 0)
                                 log_debug("could not set ifindex of netdev '%s' to %d: %s",
                                           name, ifindex, strerror(-r));