MPTCP Linux Development
 help / color / mirror / Atom feed
* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next] Squash to "mptcp: add rm_list_tx in mptcp_pm_data"
@ 2021-02-19  1:14 Mat Martineau
  0 siblings, 0 replies; 2+ messages in thread
From: Mat Martineau @ 2021-02-19  1:14 UTC (permalink / raw)
  To: mptcp 

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

On Thu, 18 Feb 2021, Geliang Tang wrote:

> Fix the length of RM_ADDR suboption in mptcp_pm_rm_addr_signal.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> v2:
> - clear msk->pm.addr_signal in the error case.
> ---
> net/mptcp/pm.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index 32f203f186a2..f3db3adfe3fc 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -260,7 +260,7 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
> bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
> 			     struct mptcp_rm_list *rm_list)
> {
> -	int ret = false;
> +	int ret = false, len;
>
> 	spin_lock_bh(&msk->pm.lock);
>
> @@ -268,7 +268,12 @@ bool mptcp_pm_rm_addr_signal(struct mptcp_sock *msk, unsigned int remaining,
> 	if (!mptcp_pm_should_rm_signal(msk))
> 		goto out_unlock;
>
> -	if (remaining < TCPOLEN_MPTCP_RM_ADDR_BASE)
> +	len = mptcp_rm_addr_len(msk->pm.rm_list_tx);
> +	if (len < 0) {
> +		WRITE_ONCE(msk->pm.addr_signal, 0);
> +		goto out_unlock;
> +	}
> +	if (remaining < len)
> 		goto out_unlock;
>
> 	*rm_list = msk->pm.rm_list_tx;
> -- 
> 2.29.2

Thanks for the v2, looks ready to squash.

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next] Squash to "mptcp: add rm_list_tx in mptcp_pm_data"
@ 2021-02-22 17:10 Matthieu Baerts
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2021-02-22 17:10 UTC (permalink / raw)
  To: mptcp 

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

Hi Geliang, Mat,

On 18/02/2021 04:07, Geliang Tang wrote:
> Fix the length of RM_ADDR suboption in mptcp_pm_rm_addr_signal.

Thank you for the patch and the review!

- 2435fca3083c: "squashed" in "mptcp: add rm_list_tx in mptcp_pm_data"
- Results: 98202724d8a6..253897668c44

Tests + export are going to be started soon!

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-22 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19  1:14 [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next] Squash to "mptcp: add rm_list_tx in mptcp_pm_data" Mat Martineau
  -- strict thread matches above, loose matches on Subject: below --
2021-02-22 17:10 Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox