#include "utf8.h"
#include "util.h"
#include "conf-parser.h"
-#include "net-util.h"
+#include "network-internal.h"
int address_new_static(Network *network, unsigned section, Address **ret) {
_cleanup_address_free_ Address *address = NULL;
return -ENOMEM;
address->family = AF_UNSPEC;
+ address->scope = RT_SCOPE_UNIVERSE;
address->network = network;
return -ENOMEM;
address->family = AF_UNSPEC;
+ address->scope = RT_SCOPE_UNIVERSE;
*ret = address;
address = NULL;
return r;
}
- r = sd_rtnl_message_addr_set_scope(req, RT_SCOPE_UNIVERSE);
+ r = sd_rtnl_message_addr_set_scope(req, address->scope);
if (r < 0) {
log_error("Could not set scope: %s", strerror(-r));
return r;
const char *rvalue,
void *data,
void *userdata) {
- Address **dns = data;
+ Set **dns = data;
_cleanup_address_free_ Address *n = NULL;
int r;
return 0;
}
- *dns = n;
+ set_put(*dns, n);
n = NULL;
return 0;