* [MPTCP] Re: [PATCH mptcp-next v2] Squash to "selftests: mptcp: add addr argument for del_addr"
@ 2021-03-13 10:16 Matthieu Baerts
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2021-03-13 10:16 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
Hi Mat,
On 12/03/2021 20:01, Mat Martineau wrote:
> On Fri, 12 Mar 2021, Matthieu Baerts wrote:
>
>> Avoid calling pm_nl_ctl with id > 255.
(...)
> Thanks for the fix Matthieu, looks good to me.
Thank you for the review!
After some discussions with Geliang in the v1, it was decided to create
a standalone patch instead. Please see:
https://patchwork.ozlabs.org/project/mptcp/patch/20210312151358.3426301-1-matthieu.baerts(a)tessares.net/
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 2+ messages in thread
* [MPTCP] Re: [PATCH mptcp-next v2] Squash to "selftests: mptcp: add addr argument for del_addr"
@ 2021-03-12 19:01 Mat Martineau
0 siblings, 0 replies; 2+ messages in thread
From: Mat Martineau @ 2021-03-12 19:01 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
On Fri, 12 Mar 2021, Matthieu Baerts wrote:
> Avoid calling pm_nl_ctl with id > 255.
>
> Without this patch, we can see this when running the selftests:
>
> selftests: net/mptcp: pm_netlink.sh
> (...)
> above hard addr limit [ OK ]
> ./pm_nl_ctl add|get|set|del|flush|dump|accept
> add [flags signal|subflow|backup] [id <nr>] [dev <name>] <ip>
> del <id>
> get <id>
> set <ip> [flags backup|nobackup]
> flush
> dump
> limits [<rcv addr max> <subflow max>]
>
> id limit [ OK ]
> (...)
>
> That's because we were calling:
>
> $ pm_nl_ctl del 256
>
> In the code, the parsed ID is written in a u_int8_t. Then the value
> "256" is stored as "0" which is now a special case and requires an IP.
>
> We could modify pm_nl_ctl and stop if the ID is negative or higher than
> 255 but not sure we need this for a tool only used in selftests.
>
> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
> ---
>
> Notes:
> to be squashed in "selftests: mptcp: add addr argument for del_addr"
>
> v2:
> - only modify the for-loop higher limit. (Geliang)
>
> tools/testing/selftests/net/mptcp/pm_netlink.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> index a617e293734c..2ba91c63f24e 100755
> --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh
> +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> @@ -100,7 +100,7 @@ done
> check "ip netns exec $ns1 ./pm_nl_ctl get 9" "id 9 flags signal 10.0.1.9" "hard addr limit"
> check "ip netns exec $ns1 ./pm_nl_ctl get 10" "" "above hard addr limit"
>
> -for i in `seq 9 256`; do
> +for i in `seq 9 255`; do
> ip netns exec $ns1 ./pm_nl_ctl del $i
> ip netns exec $ns1 ./pm_nl_ctl add 10.0.0.9 id $((i+1))
> done
> --
> 2.30.2
Thanks for the fix Matthieu, looks good to me.
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-13 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 10:16 [MPTCP] Re: [PATCH mptcp-next v2] Squash to "selftests: mptcp: add addr argument for del_addr" Matthieu Baerts
-- strict thread matches above, loose matches on Subject: below --
2021-03-12 19:01 Mat Martineau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).