summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd/sd-rtnl/local-addresses.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/local-addresses.c b/src/libsystemd/sd-rtnl/local-addresses.c
index 629f896974..e520cdfa6d 100644
--- a/src/libsystemd/sd-rtnl/local-addresses.c
+++ b/src/libsystemd/sd-rtnl/local-addresses.c
@@ -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) {