int r;
assert(link);
- assert(link->state == LINK_STATE_ENSLAVING);
assert(link->network);
if (!(link->flags & IFF_UP)) {
int r;
assert(link);
- assert(IN_SET(link->state, LINK_STATE_ENSLAVING, LINK_STATE_FAILED,
- LINK_STATE_LINGER));
assert(link->network);
link->enslaving --;
return 0;
}
+ r = sd_rtnl_message_addr_get_flags(message, &address->flags);
+ if (r < 0) {
+ log_warning_link(link,
+ "rtnl: received address with invalid flags, ignoring");
+ return 0;
+ }
+
switch (address->family) {
case AF_INET:
r = sd_rtnl_message_read_in_addr(message, IFA_LOCAL,
/* if we have carrier, check what addresses we have */
LIST_FOREACH(addresses, address, link->addresses) {
+ if (address->flags & (IFA_F_TENTATIVE | IFA_F_DEPRECATED))
+ continue;
+
if (address->scope < scope)
scope = address->scope;
}