network: compare addresses more strictly
This re-introduce the full hash and compre functions for Address,
which was reverted
1d30fc5cb64ecba2f03fe42aa0d8c65c3decad82 (#17851).
The issue #17831, which is fixed by #17851, is handled in a different way;
simply ignore to configure the conflicted DHCPv6 address. Previously, we
warn about the conflict, but continue to configure the address anyway, and
the kernel ignores the request. So, it is not necessary to request the
conflicted address in networkd side.
This fixes the following issues:
- when a link has an address, and corresponding .network file has the
address with different prefix length, then the prefix length specified
in the .network file will not be applied,
- we cannot specify multiple IPv4 addresses with different prefix
length, e.g.
----
Address=10.10.10.10/24
Address=10.10.10.10/16
----
This is spurious setup, but the kernel allows it.
Fixes #22515.