network: refuse further requests when manager is in MANAGER_STOPPED
In that case, requests will never be processed anyway. But further more, we cannot call link_ref() at that stage. Otherwise, we trigger assertion.
This commit is contained in:
@@ -38,6 +38,9 @@ static int netlabel_command(uint16_t command, const char *label, const Address *
|
||||
assert(address->link->manager->genl);
|
||||
assert(IN_SET(address->family, AF_INET, AF_INET6));
|
||||
|
||||
if (address->link->manager->state == MANAGER_STOPPED)
|
||||
return 0; /* We cannot call link_ref() below. */
|
||||
|
||||
r = sd_genl_message_new(address->link->manager->genl, NETLBL_NLTYPE_UNLABELED_NAME, command, &m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user