From 1dd4fec550c70f263a2fa84e44d440e5d3c5648b Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 27 Jul 2017 10:59:43 +0200 Subject: [PATCH] platform: fix IPv4 secondary address detection If the subnet index was built without the @full_index flag, secondary addresses are not present in the hash table. Fixes: 5fcca9ba3e37152b9fbe645a8436cacbcf846dc5 --- src/platform/nm-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index c9aa055fc8..3b626669c3 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -3091,7 +3091,7 @@ ip4_addr_subnets_build_index (const GPtrArray *addresses, position = 0; /* prepend */ g_ptr_array_insert (addr_list, position, p_address); } else { - /* we only care about the primay. No need to track the secondaries + /* we only care about the primary. No need to track the secondaries * as a GPtrArray. */ nm_assert (ip4_addr_subnets_is_plain_address (addresses, p)); if ( consider_flags @@ -3142,8 +3142,8 @@ ip4_addr_subnets_is_secondary (const NMPObject *address, if (*o != address) return TRUE; } else { - nm_assert (address == *((gconstpointer *) p)); NM_SET_OUT (out_addr_list, NULL); + return address != *((gconstpointer *) p); } return FALSE; }