chiark / gitweb /
networkd: refuse to use .network files with missing Address/Gateway key
[elogind.git] / src / network / networkd-route.c
index 488d3f5013719bac0be8a34fe11a2a73778eb099..83dad655db19658d5434c4191881afae439c21bd 100644 (file)
@@ -231,7 +231,7 @@ int config_parse_destination(const char *unit,
                         return log_oom();
         }
 
-        r = net_parse_inaddr(address, &n->family, &n->dst_addr);
+        r = net_parse_inaddr(address, &n->dst_family, &n->dst_addr);
         if (r < 0) {
                 log_syntax(unit, LOG_ERR, filename, line, EINVAL,
                            "Destination is invalid, ignoring assignment: %s", address);
@@ -252,7 +252,7 @@ int config_parse_destination(const char *unit,
 
                 n->dst_prefixlen = (unsigned char) i;
         } else {
-                switch (n->family) {
+                switch (n->dst_family) {
                         case AF_INET:
                                 n->dst_prefixlen = 32;
                                 break;