Hi Geliang,
On 24/01/2025 08:10, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> Use ipv6_addr_equal() to check whether two IPv6 addresses are equal in
> mptcp_addresses_equal() is more appropriate than using ipv6_addr_cmp().
>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> net/mptcp/pm_netlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 1462dc7e886d..6461aa742385 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);
Good idea, that looks more logical!
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.