summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index a63773928f..c92418967b 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -47,6 +47,7 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
return -ENOMEM;
address->family = AF_UNSPEC;
+ address->scope = RT_SCOPE_UNIVERSE;
address->network = network;
@@ -71,6 +72,7 @@ int address_new_dynamic(Address **ret) {
return -ENOMEM;
address->family = AF_UNSPEC;
+ address->scope = RT_SCOPE_UNIVERSE;
*ret = address;
address = NULL;
@@ -170,7 +172,7 @@ int address_configure(Address *address, Link *link,
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;