chiark / gitweb /
networkd: rename Address and Route list fields
[elogind.git] / src / network / networkd-network.c
index 91b1e3c7bdbc20ee31a21cecd8680abedc2b5529..2a68d3ec50f63fd5e4c772ea3326cb01c3751be0 100644 (file)
@@ -20,6 +20,7 @@
 ***/
 
 #include <ctype.h>
+#include <net/if.h>
 
 #include "networkd.h"
 #include "network-internal.h"
@@ -97,7 +98,7 @@ static int network_load_one(Manager *manager, const char *filename) {
 
         LIST_PREPEND(networks, manager->networks, network);
 
-        LIST_FOREACH(static_routes, route, network->static_routes) {
+        LIST_FOREACH(routes, route, network->static_routes) {
                 if (!route->family) {
                         log_warning("Route section without Gateway field configured in %s. "
                                     "Ignoring", filename);
@@ -105,7 +106,7 @@ static int network_load_one(Manager *manager, const char *filename) {
                 }
         }
 
-        LIST_FOREACH(static_addresses, address, network->static_addresses) {
+        LIST_FOREACH(addresses, address, network->static_addresses) {
                 if (!address->family) {
                         log_warning("Address section without Address field configured in %s. "
                                     "Ignoring", filename);
@@ -220,7 +221,7 @@ int network_get(Manager *manager, struct udev_device *device,
                                      udev_device_get_property_value(device, "ID_NET_DRIVER"),
                                      udev_device_get_devtype(device),
                                      ifname)) {
-                        log_debug("%s: found matching network '%s'", ifname,
+                        log_debug("%*s: found matching network '%s'", IFNAMSIZ, ifname,
                                   network->filename);
                         *ret = network;
                         return 0;