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, 4 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 3f787948f9..de5566dfdb 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -46,6 +46,8 @@ int address_new_static(Network *network, unsigned section, Address **ret) {
if (!address)
return -ENOMEM;
+ address->family = AF_UNSPEC;
+
address->network = network;
LIST_PREPEND(static_addresses, network->static_addresses, address);
@@ -68,6 +70,8 @@ int address_new_dynamic(Address **ret) {
if (!address)
return -ENOMEM;
+ address->family = AF_UNSPEC;
+
*ret = address;
address = NULL;