summaryrefslogtreecommitdiff
path: root/src/network/test-network.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/test-network.c')
-rw-r--r--src/network/test-network.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network/test-network.c b/src/network/test-network.c
index 80676651a9..bac1d6781d 100644
--- a/src/network/test-network.c
+++ b/src/network/test-network.c
@@ -158,17 +158,18 @@ static void test_address_equality(void) {
assert_se(address_equal(a1, a2));
assert_se(inet_pton(AF_INET, "192.168.3.9", &a1->in_addr.in));
- assert_se(address_equal(a1, a2));
+ assert_se(!address_equal(a1, a2));
assert_se(inet_pton(AF_INET, "192.168.3.9", &a2->in_addr.in));
assert_se(address_equal(a1, a2));
+ assert_se(inet_pton(AF_INET, "192.168.3.10", &a1->in_addr_peer.in));
+ assert_se(address_equal(a1, a2));
+ assert_se(inet_pton(AF_INET, "192.168.3.11", &a2->in_addr_peer.in));
+ assert_se(address_equal(a1, a2));
a1->prefixlen = 10;
assert_se(!address_equal(a1, a2));
a2->prefixlen = 10;
assert_se(address_equal(a1, a2));
- assert_se(inet_pton(AF_INET, "192.168.3.10", &a2->in_addr.in));
- assert_se(address_equal(a1, a2));
-
a1->family = AF_INET6;
assert_se(!address_equal(a1, a2));