summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-10 13:52:34 +0100
committerTom Gundersen <teg@jklm.no>2015-11-11 15:42:38 +0100
commit63bbe5c767a39ee4d6acaadc5e643d6d3556d9cd (patch)
tree8f7fd7da6f8c75f808f6b2d140084f48048035f2 /src/network/networkd-address.c
parent6cf4a01c3630d87e208ef261009c8144796b64a5 (diff)
downloadsystemd-63bbe5c767a39ee4d6acaadc5e643d6d3556d9cd.tar.gz
networkd: address - drop the 'added' flag
Instead instantiate the kernel flags to TENTATIVE until the kernel updates us with the real value.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 8b6acf2e1d..5231427b14 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -248,6 +248,8 @@ static int address_add_internal(Link *link, Set **addresses,
address->family = family;
address->in_addr = *in_addr;
address->prefixlen = prefixlen;
+ /* Consider address tentative until we get the real flags from the kernel */
+ address->flags = IFA_F_TENTATIVE;
r = set_ensure_allocated(addresses, &address_hash_ops);
if (r < 0)
@@ -333,7 +335,6 @@ int address_update(Address *address, unsigned char flags, unsigned char scope, s
ready = address_is_ready(address);
- address->added = true;
address->flags = flags;
address->scope = scope;
address->cinfo = *cinfo;
@@ -769,5 +770,5 @@ int config_parse_label(const char *unit,
bool address_is_ready(const Address *a) {
assert(a);
- return a->added && !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED));
+ return !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED));
}