Skip to contentSkip to conversation

init ahmac and port of mptcp_options_received

PATCH In review Geliang Tang 3 participants 8 messages Oct 19, 2020 – Oct 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover init ahmac and port of mptcp_options_received

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Geliang Tang (2):
mptcp: initialize mptcp_options_received's ahmac
mptcp: move mptcp_options_received's port initialization

 net/mptcp/options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 mptcp: initialize mptcp_options_received's ahmac

This patch initialize mptcp_options_received's ahmac to zero, otherwise it will be a random number when receiving ADD_ADDR suboption with echo-flag=1.

Fixes 3df523ab582c5 ("mptcp: Add ADD_ADDR handling")
Signed-off-by Geliang Tang <geliangtang(a)gmail.com>
---
 net/mptcp/options.c | 1 +
 1 file changed, 1 insertion(+)
net/mptcp/options.c +1 -0
index 092a2d48bfd3..1ff3469938b6 100644
@@ -297,6 +297,7 @@ void mptcp_get_options(const struct sk_buff *skb,
 	mp_opt->mp_capable = 0;
 	mp_opt->mp_join = 0;
 	mp_opt->add_addr = 0;
+	mp_opt->ahmac = 0;
 	mp_opt->rm_addr = 0;
 	mp_opt->dss = 0;
 
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 mptcp: move mptcp_options_received's port initialization

This patch moved mptcp_options_received's port initialization from mptcp_parse_option to mptcp_get_options, put it together with the other fields initializations of mptcp_options_received.

Fixes 3df523ab582c5 ("mptcp: Add ADD_ADDR handling")
Signed-off-by Geliang Tang <geliangtang(a)gmail.com>
---
 net/mptcp/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/options.c +1 -1
index 1ff3469938b6..a044dd43411d 100644
@@ -241,7 +241,6 @@ static void mptcp_parse_option(const struct sk_buff *skb,
 		}
 
 		mp_opt->add_addr = 1;
-		mp_opt->port = 0;
 		mp_opt->addr_id = *ptr++;
 		pr_debug("ADD_ADDR: id=%d, echo=%d", mp_opt->addr_id, mp_opt->echo);
 		if (mp_opt->family == MPTCP_ADDR_IPVERSION_4) {
@@ -298,6 +297,7 @@ void mptcp_get_options(const struct sk_buff *skb,
 	mp_opt->mp_join = 0;
 	mp_opt->add_addr = 0;
 	mp_opt->ahmac = 0;
+	mp_opt->port = 0;
 	mp_opt->rm_addr = 0;
 	mp_opt->dss = 0;
 
Signature · 1 line
2.26.2
Reviewed-by on the v1 series
#3 lore raw
In reply to Geliang Tang

Hi Geliang,

Quoted 6 lines · Geliang Tang

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Geliang Tang (2):
mptcp: initialize mptcp_options_received's ahmac
mptcp: move mptcp_options_received's port initialization

Thank you for these two patches. They look good to me except one detail:
these two patches are for -net and not net-next.

I don't know if it is alright for Jakub to apply them to -net or if it is clearer to re-send them with an updated subject.

If it is OK to apply them to -net without a re-submit, here is my:

Reviewed-by Matthieu Baerts <matthieu.baerts(a)tessares.net>

Also, if you don't mind and while I am here, I never know: is it OK for you the maintainers to send one Acked/Reviewed-by for a whole series -- but then this is not reflected on patchwork -- or should we send one tag for each patch?

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
maintainer
#4 lore raw
Quoted 13 lines · On Mon, 19 Oct 2020 18:27:55 +0200 Matthieu Baerts wrote:

Hi Geliang,

Quoted 6 lines · Geliang Tang

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Geliang Tang (2):
mptcp: initialize mptcp_options_received's ahmac
mptcp: move mptcp_options_received's port initialization

Thank you for these two patches. They look good to me except one detail:
these two patches are for -net and not net-next.

Quoted 6 lines

I don't know if it is alright for Jakub to apply them to -net or if it is clearer to re-send them with an updated subject.

If it is OK to apply them to -net without a re-submit, here is my:

Reviewed-by Matthieu Baerts <matthieu.baerts(a)tessares.net>

Thanks, I can apply to net.

Quoted 4 lines

Also, if you don't mind and while I am here, I never know: is it OK for you the maintainers to send one Acked/Reviewed-by for a whole series -- but then this is not reflected on patchwork -- or should we send one tag for each patch?

It's fine, we propagate those semi-manually, but it's not a problem. Hopefully patchwork will address this at some point :(

#5 lore raw

Hi Jakub,

Quoted 14 lines · Jakub Kicinski
Quoted 13 lines · On Mon, 19 Oct 2020 18:27:55 +0200 Matthieu Baerts wrote:

Hi Geliang,

Quoted 6 lines · Geliang Tang

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Geliang Tang (2):
mptcp: initialize mptcp_options_received's ahmac
mptcp: move mptcp_options_received's port initialization

Thank you for these two patches. They look good to me except one detail:
these two patches are for -net and not net-next.

Quoted 8 lines
Quoted 6 lines

I don't know if it is alright for Jakub to apply them to -net or if it is clearer to re-send them with an updated subject.

If it is OK to apply them to -net without a re-submit, here is my:

Reviewed-by Matthieu Baerts <matthieu.baerts(a)tessares.net>

Thanks, I can apply to net.

Great, thank you!

BTW, nice work with the maintenance of Net! More reasons for davem to take time recovering :)

Quoted 8 lines
Quoted 5 lines

Also, if you don't mind and while I am here, I never know: is it OK for you the maintainers to send one Acked/Reviewed-by for a whole series -- but then this is not reflected on patchwork -- or should we send one tag for each patch?

It's fine, we propagate those semi-manually, but it's not a problem. Hopefully patchwork will address this at some point :(

Thank you for your reply, good to know!

Then next time, I will send these tags per patch to save you some semi-manual operations :)

Some preparation works have been done on patchwork side but the feature is not available yet:

https://github.com/getpatchwork/patchwork/issues/113

Hopefully soon!

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
maintainer
#6 lore raw
In reply to Geliang Tang
Quoted 2 lines · On Mon, 19 Oct 2020 18:23:14 +0800 Geliang Tang wrote:

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Applied, but two extra comments:
- please make sure the commit messages are in imperative form e.g. "Initialize x..." rather than "This patches initializes x.."
- I dropped the Fixes tag from patch 2, and only queued patch 1 for stable - patch 2 is a minor clean up, right?

Thanks!

#7 lore raw

Hi Jakub,

Quoted 10 lines · Jakub Kicinski <kuba(a)kernel.org> 于2020年10月21日周三 上午7:39写道:
Quoted 2 lines · On Mon, 19 Oct 2020 18:23:14 +0800 Geliang Tang wrote:

This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port.

Applied, but two extra comments:
- please make sure the commit messages are in imperative form e.g. "Initialize x..." rather than "This patches initializes x.."
- I dropped the Fixes tag from patch 2, and only queued patch 1 for stable - patch 2 is a minor clean up, right?

Yes, that's right. Thanks for applying and updating the patches.

-Geliang

Quoted 2 lines

Thanks!