mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-11-02 23:49:04 +00:00
totemip: insert items in correct order
list_add_tail is used instead of list_add so ip addresses are inserted in same order as returned by getifaddrs. Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
d7e205d197
commit
aaa575e091
@ -384,7 +384,7 @@ int totemip_getifaddrs(struct list_head *addrs)
|
||||
goto error_free_addr_name;
|
||||
}
|
||||
|
||||
list_add(&if_addr->list, addrs);
|
||||
list_add_tail(&if_addr->list, addrs);
|
||||
}
|
||||
|
||||
freeifaddrs(ifap);
|
||||
@ -484,7 +484,7 @@ int totemip_getifaddrs(struct list_head *addrs)
|
||||
if_addr->interface_num = lifreq[i].lifr_index;
|
||||
}
|
||||
|
||||
list_add(&if_addr->list, addrs);
|
||||
list_add_tail(&if_addr->list, addrs);
|
||||
}
|
||||
|
||||
free (lifconf.lifc_buf);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user