summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-09-28 13:30:10 +0200
committerTom Gundersen <teg@jklm.no>2015-10-11 15:04:16 +0200
commitce6c77ebf12f80c807ad7589a1fb565fabc6a543 (patch)
treea98bda5e7ec2f3a54b2e75d4277092466e2e887a /src/network/networkd-address.c
parent91b5f997316ddc77d26f9a7a5e24c335484586bd (diff)
networkd: address - introduce address_is_ready()
Checks that a given address is not tentative nor deprecated.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 48715972b6..316ae2e4cb 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -738,3 +738,9 @@ int config_parse_label(const char *unit,
return 0;
}
+
+bool address_is_ready(const Address *a) {
+ assert(a);
+
+ return !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED));
+}