diff options
author | Geliang Tang <tanggeliang@kylinos.cn> | 2025-02-21 16:44:00 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-24 18:23:44 -0800 |
commit | 7720790fd56b91259efe500a702ad4c0fd29b260 (patch) | |
tree | 168ae97ff6649ddfeb37f23a2450e002008c966b /net/mptcp | |
parent | dc41695200a1f5db720f7988952a74833542831d (diff) |
mptcp: pm: use ipv6_addr_equal in addresses_equal
Use ipv6_addr_equal() to check whether two IPv6 addresses are equal in
mptcp_addresses_equal().
This is more appropriate than using !ipv6_addr_cmp().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250221-net-next-mptcp-pm-misc-cleanup-3-v1-7-2b70ab1cee79@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/pm_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index f67b637c1fcf..ef85a60151ad 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -64,7 +64,7 @@ bool mptcp_addresses_equal(const struct mptcp_addr_info *a, addr_equals = a->addr.s_addr == b->addr.s_addr; #if IS_ENABLED(CONFIG_MPTCP_IPV6) else - addr_equals = !ipv6_addr_cmp(&a->addr6, &b->addr6); + addr_equals = ipv6_addr_equal(&a->addr6, &b->addr6); } else if (a->family == AF_INET) { if (ipv6_addr_v4mapped(&b->addr6)) addr_equals = a->addr.s_addr == b->addr6.s6_addr32[3]; |