Checks that a given address is not tentative nor deprecated.
return 0;
}
+
+bool address_is_ready(const Address *a) {
+ assert(a);
+
+ return !(a->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED));
+}
int address_update(Address *address, Link *link, sd_netlink_message_handler_t callback);
int address_remove(Address *address, Link *link, sd_netlink_message_handler_t callback);
bool address_equal(Address *a1, Address *a2);
+bool address_is_ready(const Address *a);
DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
#define _cleanup_address_free_ _cleanup_(address_freep)
/* if we have carrier, check what addresses we have */
SET_FOREACH(address, link->addresses, i) {
- if (address->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED))
+ if (!address_is_ready(address))
continue;
if (address->scope < scope)