rtnl: order local addresses/gateways by the address itself as last resort

This way we can be sure that the returned list is stable regarding
modifications in the kernel.
This commit is contained in:
Lennart Poettering 2014-12-04 04:16:29 +01:00
parent 9008e1ac92
commit 00d75e5752
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ static int address_compare(const void *_a, const void *_b) {
if (a->ifindex > b->ifindex)
return 1;
return 0;
return memcmp(&a->address, &b->address, FAMILY_ADDRESS_SIZE(a->family));
}
int local_addresses(sd_rtnl *context, int ifindex, int af, struct local_address **ret) {