"/etc/systemd/network",
"/run/systemd/network",
"/usr/lib/systemd/network",
-#ifdef HAVE_SPLIT_USER
+#ifdef HAVE_SPLIT_USR
"/lib/systemd/network",
#endif
NULL};
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)
- log_debug("received RTM_NEWLINK message without valid IFLA_IFNAME");
+ log_warning("received RTM_NEWLINK message without valid ifname");
else {
NetDev *netdev;
assert(m);
- r = mkdir_safe_label("/run/systemd/network", 0755, 0, 0);
- if (r < 0)
- return r;
-
r = fopen_temporary("/run/systemd/network/resolv.conf", &f, &temp_path);
if (r < 0)
return r;
}
}
- HASHMAP_FOREACH(link, m->links, i)
- if (link->network && link->network->dns)
- append_dns(f, &link->network->dns->in_addr.in,
- link->network->dns->family, &count);
+ HASHMAP_FOREACH(link, m->links, i) {
+ if (link->network && link->network->dns) {
+ Address *address;
+ Iterator j;
+
+ SET_FOREACH(address, link->network->dns, j) {
+ append_dns(f, &address->in_addr.in,
+ address->family, &count);
+ }
+ }
+ }
fflush(f);