Hi Geliang,
Thank you for reviewing these patches!
On 21/12/2020 11:16, Geliang Tang wrote:
Matthieu Baerts <matthieu.baerts(a)tessares.net> 于2020年12月19日周六
下午9:07写道:
>
> On one side, we can allow the creation of subflows between v4 mapped in
> v6 and v4 addresses. For that we look for v4mapped addresses between the
> local address we want to select and the remote one.
>
> On the other side, we also properly deal with received v4mapped
> addresses, either announced ones or set via Netlink.
(...)
> @@ -133,8 +138,8 @@ static bool lookup_subflow_by_saddr(const
struct list_head *list,
> }
>
> static struct mptcp_pm_addr_entry *
> -select_local_address(const struct pm_nl_pernet *pernet,
> - struct mptcp_sock *msk)
> +select_local_address(const struct pm_nl_pernet *pernet, struct mptcp_sock *msk,
> + struct mptcp_addr_info *remote)
> {
> struct mptcp_pm_addr_entry *entry, *ret = NULL;
>
I think we should avoid adding a new parameter here, we can call
remote_address again in this function to get the remote address.
I agree we can build "remote" from the msk but I didn't do it because
select_local_address() is only used at one place just after having built
this "remote".
Do you think we still should rebuild "remote"?
> @@ -144,11 +149,19 @@ select_local_address(const struct
pm_nl_pernet *pernet,
> if (!(entry->addr.flags & MPTCP_PM_ADDR_FLAG_SUBFLOW))
> continue;
>
> + if (entry->addr.family != remote->family)
I think we should add a "{" here ...
Do you mean I should add them to avoid ambiguities? Checkpatch and the
compiler are OK with both but I don't mind changing if it is clearer.
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net