chiark / gitweb /
nspawn: require /etc/os-release only for init
[elogind.git] / src / network / networkd-route.c
index 83dad655db19658d5434c4191881afae439c21bd..29ee1045da55ed7c6b067b180c980faf960a53eb 100644 (file)
@@ -47,6 +47,8 @@ int route_new_static(Network *network, unsigned section, Route **ret) {
         if (!route)
                 return -ENOMEM;
 
+        route->family = AF_UNSPEC;
+
         route->network = network;
 
         LIST_PREPEND(static_routes, network->static_routes, route);
@@ -69,6 +71,8 @@ int route_new_dynamic(Route **ret) {
         if (!route)
                 return -ENOMEM;
 
+        route->family = AF_UNSPEC;
+
         *ret = route;
         route = NULL;
 
@@ -231,7 +235,7 @@ int config_parse_destination(const char *unit,
                         return log_oom();
         }
 
-        r = net_parse_inaddr(address, &n->dst_family, &n->dst_addr);
+        r = net_parse_inaddr(address, &n->family, &n->dst_addr);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                            "Destination is invalid, ignoring assignment: %s", address);
@@ -252,7 +256,7 @@ int config_parse_destination(const char *unit,
 
                 n->dst_prefixlen = (unsigned char) i;
         } else {
-                switch (n->dst_family) {
+                switch (n->family) {
                         case AF_INET:
                                 n->dst_prefixlen = 32;
                                 break;