mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
ctdb-ipalloc: Move merged IP list creation to ipalloc()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12254 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 7522a7aee8f4756639311d2450b723debd674c6b)
This commit is contained in:
parent
0d80ca283b
commit
78ae3ec067
@ -231,9 +231,7 @@ bool ipalloc_set_public_ips(struct ipalloc_state *ipalloc_state,
|
||||
ipalloc_state->available_public_ips = available_ips;
|
||||
ipalloc_state->known_public_ips = known_ips;
|
||||
|
||||
ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
|
||||
|
||||
return (ipalloc_state->all_ips != NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* This can only return false if there are no available IPs *and*
|
||||
@ -282,6 +280,11 @@ struct public_ip_list *ipalloc(struct ipalloc_state *ipalloc_state)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
ipalloc_state->all_ips = create_merged_ip_list(ipalloc_state);
|
||||
if (ipalloc_state->all_ips == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (ipalloc_state->algorithm) {
|
||||
case IPALLOC_LCP2:
|
||||
ret = ipalloc_lcp2(ipalloc_state);
|
||||
|
Loading…
x
Reference in New Issue
Block a user