mptcp: drop unused sk in mptcp_get_options
The parameter 'sk' became useless since the code using it was dropped
from mptcp_get_options() in the commit 8d548ea1dd ("mptcp: do not set
unconditionally csum_reqd on incoming opt"). Let's drop it.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
f8e9ce4a6e
commit
0799e21b5a
@@ -355,8 +355,7 @@ static void mptcp_parse_option(const struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mptcp_get_options(const struct sock *sk,
|
void mptcp_get_options(const struct sk_buff *skb,
|
||||||
const struct sk_buff *skb,
|
|
||||||
struct mptcp_options_received *mp_opt)
|
struct mptcp_options_received *mp_opt)
|
||||||
{
|
{
|
||||||
const struct tcphdr *th = tcp_hdr(skb);
|
const struct tcphdr *th = tcp_hdr(skb);
|
||||||
@@ -1114,7 +1113,7 @@ bool mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mptcp_get_options(sk, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
|
|
||||||
/* The subflow can be in close state only if check_fully_established()
|
/* The subflow can be in close state only if check_fully_established()
|
||||||
* just sent a reset. If so, tell the caller to ignore the current packet.
|
* just sent a reset. If so, tell the caller to ignore the current packet.
|
||||||
|
|||||||
@@ -643,8 +643,7 @@ int __init mptcp_proto_v6_init(void);
|
|||||||
struct sock *mptcp_sk_clone(const struct sock *sk,
|
struct sock *mptcp_sk_clone(const struct sock *sk,
|
||||||
const struct mptcp_options_received *mp_opt,
|
const struct mptcp_options_received *mp_opt,
|
||||||
struct request_sock *req);
|
struct request_sock *req);
|
||||||
void mptcp_get_options(const struct sock *sk,
|
void mptcp_get_options(const struct sk_buff *skb,
|
||||||
const struct sk_buff *skb,
|
|
||||||
struct mptcp_options_received *mp_opt);
|
struct mptcp_options_received *mp_opt);
|
||||||
|
|
||||||
void mptcp_finish_connect(struct sock *sk);
|
void mptcp_finish_connect(struct sock *sk);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ static int subflow_check_req(struct request_sock *req,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mptcp_get_options(sk_listener, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
|
|
||||||
opt_mp_capable = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPC);
|
opt_mp_capable = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPC);
|
||||||
opt_mp_join = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ);
|
opt_mp_join = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ);
|
||||||
@@ -250,7 +250,7 @@ int mptcp_subflow_init_cookie_req(struct request_sock *req,
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
subflow_init_req(req, sk_listener);
|
subflow_init_req(req, sk_listener);
|
||||||
mptcp_get_options(sk_listener, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
|
|
||||||
opt_mp_capable = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPC);
|
opt_mp_capable = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPC);
|
||||||
opt_mp_join = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ);
|
opt_mp_join = !!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ);
|
||||||
@@ -410,7 +410,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
|
|||||||
subflow->ssn_offset = TCP_SKB_CB(skb)->seq;
|
subflow->ssn_offset = TCP_SKB_CB(skb)->seq;
|
||||||
pr_debug("subflow=%p synack seq=%x", subflow, subflow->ssn_offset);
|
pr_debug("subflow=%p synack seq=%x", subflow, subflow->ssn_offset);
|
||||||
|
|
||||||
mptcp_get_options(sk, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
if (subflow->request_mptcp) {
|
if (subflow->request_mptcp) {
|
||||||
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPC)) {
|
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPC)) {
|
||||||
MPTCP_INC_STATS(sock_net(sk),
|
MPTCP_INC_STATS(sock_net(sk),
|
||||||
@@ -663,7 +663,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
|
|||||||
* reordered MPC will cause fallback, but we don't have other
|
* reordered MPC will cause fallback, but we don't have other
|
||||||
* options.
|
* options.
|
||||||
*/
|
*/
|
||||||
mptcp_get_options(sk, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPC)) {
|
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPC)) {
|
||||||
fallback = true;
|
fallback = true;
|
||||||
goto create_child;
|
goto create_child;
|
||||||
@@ -673,7 +673,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
|
|||||||
if (!new_msk)
|
if (!new_msk)
|
||||||
fallback = true;
|
fallback = true;
|
||||||
} else if (subflow_req->mp_join) {
|
} else if (subflow_req->mp_join) {
|
||||||
mptcp_get_options(sk, skb, &mp_opt);
|
mptcp_get_options(skb, &mp_opt);
|
||||||
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ) ||
|
if (!(mp_opt.suboptions & OPTIONS_MPTCP_MPJ) ||
|
||||||
!subflow_hmac_valid(req, &mp_opt) ||
|
!subflow_hmac_valid(req, &mp_opt) ||
|
||||||
!mptcp_can_accept_new_subflow(subflow_req->msk)) {
|
!mptcp_can_accept_new_subflow(subflow_req->msk)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user