Skip to content

Commit e985901

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
mptcp: drop inet6_sk in mptcp_nl_find_ssk
In mptcp_nl_find_ssk(), 'issk' has already been got through inet_sk(). No need to use inet6_sk() to get 'pinfo' again, just use issk->pinet6 instead. This patch also drops this 'pinfo' variable. Signed-off-by: Geliang Tang <[email protected]>
1 parent 1e72b9d commit e985901

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

net/mptcp/pm_userspace.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,7 @@ static struct sock *mptcp_nl_find_ssk(struct mptcp_sock *msk,
465465
break;
466466
#if IS_ENABLED(CONFIG_MPTCP_IPV6)
467467
case AF_INET6: {
468-
const struct ipv6_pinfo *pinfo = inet6_sk(ssk);
469-
470-
if (!ipv6_addr_equal(&local->addr6, &pinfo->saddr) ||
468+
if (!ipv6_addr_equal(&local->addr6, &issk->pinet6->saddr) ||
471469
!ipv6_addr_equal(&remote->addr6, &ssk->sk_v6_daddr))
472470
continue;
473471
break;

0 commit comments

Comments
 (0)