mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 02:21:44 +03:00
network: add assertions
As they do not have default callback functions.
This commit is contained in:
parent
4645ad47ac
commit
bd1175bc46
@ -570,6 +570,7 @@ int address_configure(
|
||||
assert(link->ifindex > 0);
|
||||
assert(link->manager);
|
||||
assert(link->manager->rtnl);
|
||||
assert(callback);
|
||||
|
||||
/* If this is a new address, then refuse adding more than the limit */
|
||||
if (address_get(link, address->family, &address->in_addr, address->prefixlen, NULL) <= 0 &&
|
||||
|
@ -513,6 +513,7 @@ int route_configure(
|
||||
assert(link->manager->rtnl);
|
||||
assert(link->ifindex > 0);
|
||||
assert(IN_SET(route->family, AF_INET, AF_INET6));
|
||||
assert(callback);
|
||||
|
||||
if (route_get(link, route->family, &route->dst, route->dst_prefixlen, route->tos, route->priority, route->table, NULL) <= 0 &&
|
||||
set_size(link->routes) >= routes_max())
|
||||
|
Loading…
Reference in New Issue
Block a user