summaryrefslogtreecommitdiff
path: root/src/network/test-network.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-11-29 03:20:33 +0900
committerLuca Boccassi <luca.boccassi@gmail.com>2022-12-07 15:10:45 +0100
commit42f8b6a80878e688b821adfb315c0a1f0a7076ce (patch)
treeff59e102251ded0c6361c989ddfe99af1554a1c0 /src/network/test-network.c
parentb448fc0a6f6752ef2faa3907422e0034d5e6d8a3 (diff)
downloadsystemd-42f8b6a80878e688b821adfb315c0a1f0a7076ce.tar.gz
network: manage addresses in the way the kernel does
This effectively reverts 5d0030310c134a016321ad8cf0b4ede8b1800d84. With the commit 5d0030310c134a016321ad8cf0b4ede8b1800d84, networkd manages addresses with the detailed hash and compare functions. But that causes networkd cannot detect address update by the kernel or an external tool. See issue https://github.com/systemd/systemd/issues/481#issuecomment-1328132401. With this commit, networkd (again) manages addresses in the way that the kernel does. Hence, we can correctly detect address update.
Diffstat (limited to 'src/network/test-network.c')
-rw-r--r--src/network/test-network.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/network/test-network.c b/src/network/test-network.c
index 0145c8b7c7..250ab9eff4 100644
--- a/src/network/test-network.c
+++ b/src/network/test-network.c
@@ -174,16 +174,6 @@ static int test_load_config(Manager *manager) {
return 0;
}
-static bool address_equal(const Address *a1, const Address *a2) {
- if (a1 == a2)
- return true;
-
- if (!a1 || !a2)
- return false;
-
- return address_compare_func(a1, a2) == 0;
-}
-
static void test_address_equality(void) {
_cleanup_(address_freep) Address *a1 = NULL, *a2 = NULL;