Skip to content

Commit 0e6f1c7

Browse files
Geliang Tangkuba-moo
authored andcommitted
mptcp: fix for setting remote ipv4mapped address
Commit 1c670b3 ("mptcp: change local addr type of subflow_destroy") introduced a bug in mptcp_pm_nl_subflow_destroy_doit(). ipv6_addr_set_v4mapped() should be called to set the remote ipv4 address 'addr_r.addr.s_addr' to the remote ipv6 address 'addr_r.addr6', not 'addr_l.addr.addr6', which is the local ipv6 address. Fixes: 1c670b3 ("mptcp: change local addr type of subflow_destroy") Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20250114-net-next-mptcp-fix-remote-addr-v1-1-debcd84ea86f@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c80bed9 commit 0e6f1c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mptcp/pm_userspace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ int mptcp_pm_nl_subflow_destroy_doit(struct sk_buff *skb, struct genl_info *info
520520
addr_l.addr.family = AF_INET6;
521521
}
522522
if (addr_r.family == AF_INET && ipv6_addr_v4mapped(&addr_l.addr.addr6)) {
523-
ipv6_addr_set_v4mapped(addr_r.addr.s_addr, &addr_l.addr.addr6);
523+
ipv6_addr_set_v4mapped(addr_r.addr.s_addr, &addr_r.addr6);
524524
addr_r.family = AF_INET6;
525525
}
526526
#endif

0 commit comments

Comments
 (0)