We need to find a suitable static address for the DHCP server.
So, all static addresses must be verified before network_adjust_dhcp_server()
is called. For safety, let's call it from network_drop_invalid_addresses().
No functional change, just refactoring and preparation for later
commits.
assert(r > 0);
}
+ network_adjust_dhcp_server(network);
+
return 0;
}
bool have = false;
ORDERED_HASHMAP_FOREACH(address, network->addresses_by_section) {
- if (section_is_invalid(address->section))
- continue;
+ assert(!section_is_invalid(address->section));
if (address->family != AF_INET)
continue;
#include "networkd-bridge-mdb.h"
#include "networkd-dhcp-common.h"
#include "networkd-dhcp-server-static-lease.h"
-#include "networkd-dhcp-server.h"
#include "networkd-ipv6-proxy-ndp.h"
#include "networkd-manager.h"
#include "networkd-ndisc.h"
return r; /* sr_iov_drop_invalid_sections() logs internally. */
network_drop_invalid_static_leases(network);
- network_adjust_dhcp_server(network);
-
return 0;
}