Commit 5e9c7fb1 authored by Dafydd Harries's avatar Dafydd Harries

address_equal: don't compare irrelevant bits

parent 99f1ac5f
......@@ -62,7 +62,13 @@ address_to_string (Address *addr)
address_equal (Address *a, Address *b)
return memcmp (a, b, sizeof (Address)) == 0;
if (a->type != b->type)
return FALSE;
if (a->type == ADDRESS_TYPE_IPV4)
return a->addr_ipv4 == b->addr_ipv4;
g_assert_not_reached ();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment