Message ID | 6670b769c9c6129d810282c3c8bd65e3317b1578.1623316231.git.geliangtang@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | de073c6ce650f6671621a32c88e8c341b639df72 |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [mptcp-next] Squash to "mptcp: add deny_join_id0 in mptcp_options_received" | expand |
On Thu, 10 Jun 2021, Geliang Tang wrote: > Move the deny_join_id0 test into check_fully_established as Paolo > suggested. > > Signed-off-by: Geliang Tang <geliangtang@gmail.com> > --- > net/mptcp/options.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/net/mptcp/options.c b/net/mptcp/options.c > index 0d30008f0313..63c1e18d61d5 100644 > --- a/net/mptcp/options.c > +++ b/net/mptcp/options.c > @@ -910,6 +910,9 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, > return false; > } > > + if (mp_opt->deny_join_id0) > + WRITE_ONCE(msk->pm.remote_deny_join_id0, true); > + > if (unlikely(!READ_ONCE(msk->pm.server_side))) > pr_warn_once("bogus mpc option on established client sk"); > mptcp_subflow_fully_established(subflow, mp_opt); > @@ -1051,8 +1054,6 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) > } > > mptcp_get_options(sk, skb, &mp_opt); > - if (mp_opt.deny_join_id0) > - WRITE_ONCE(msk->pm.remote_deny_join_id0, true); > if (!check_fully_established(msk, sk, subflow, skb, &mp_opt)) > return; > > -- > 2.31.1 Looks good, thanks Geliang. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> -- Mat Martineau Intel
diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 0d30008f0313..63c1e18d61d5 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -910,6 +910,9 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, return false; } + if (mp_opt->deny_join_id0) + WRITE_ONCE(msk->pm.remote_deny_join_id0, true); + if (unlikely(!READ_ONCE(msk->pm.server_side))) pr_warn_once("bogus mpc option on established client sk"); mptcp_subflow_fully_established(subflow, mp_opt); @@ -1051,8 +1054,6 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb) } mptcp_get_options(sk, skb, &mp_opt); - if (mp_opt.deny_join_id0) - WRITE_ONCE(msk->pm.remote_deny_join_id0, true); if (!check_fully_established(msk, sk, subflow, skb, &mp_opt)) return;
Move the deny_join_id0 test into check_fully_established as Paolo suggested. Signed-off-by: Geliang Tang <geliangtang@gmail.com> --- net/mptcp/options.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)