mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 12:24:37 -04:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
dc41695200
commit
7720790fd5
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user