Skip to content

Commit 08b8d08

Browse files
Florian Westphaldavem330
authored andcommitted
mptcp: rename and export mptcp_subflow_request_sock_ops
syncookie code path needs to create an mptcp request sock. Prepare for this and add mptcp prefix plus needed export of ops struct. Signed-off-by: Florian Westphal <[email protected]> Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 78d8b7b commit 08b8d08

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

include/net/mptcp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct mptcp_out_options {
5858
};
5959

6060
#ifdef CONFIG_MPTCP
61+
extern struct request_sock_ops mptcp_subflow_request_sock_ops;
6162

6263
void mptcp_init(void);
6364

net/mptcp/subflow.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
284284
tcp_done(sk);
285285
}
286286

287-
static struct request_sock_ops subflow_request_sock_ops;
287+
struct request_sock_ops mptcp_subflow_request_sock_ops;
288+
EXPORT_SYMBOL_GPL(mptcp_subflow_request_sock_ops);
288289
static struct tcp_request_sock_ops subflow_request_sock_ipv4_ops;
289290

290291
static int subflow_v4_conn_request(struct sock *sk, struct sk_buff *skb)
@@ -297,7 +298,7 @@ static int subflow_v4_conn_request(struct sock *sk, struct sk_buff *skb)
297298
if (skb_rtable(skb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
298299
goto drop;
299300

300-
return tcp_conn_request(&subflow_request_sock_ops,
301+
return tcp_conn_request(&mptcp_subflow_request_sock_ops,
301302
&subflow_request_sock_ipv4_ops,
302303
sk, skb);
303304
drop:
@@ -322,7 +323,7 @@ static int subflow_v6_conn_request(struct sock *sk, struct sk_buff *skb)
322323
if (!ipv6_unicast_destination(skb))
323324
goto drop;
324325

325-
return tcp_conn_request(&subflow_request_sock_ops,
326+
return tcp_conn_request(&mptcp_subflow_request_sock_ops,
326327
&subflow_request_sock_ipv6_ops, sk, skb);
327328

328329
drop:
@@ -1311,8 +1312,8 @@ static int subflow_ops_init(struct request_sock_ops *subflow_ops)
13111312

13121313
void __init mptcp_subflow_init(void)
13131314
{
1314-
subflow_request_sock_ops = tcp_request_sock_ops;
1315-
if (subflow_ops_init(&subflow_request_sock_ops) != 0)
1315+
mptcp_subflow_request_sock_ops = tcp_request_sock_ops;
1316+
if (subflow_ops_init(&mptcp_subflow_request_sock_ops) != 0)
13161317
panic("MPTCP: failed to init subflow request sock ops\n");
13171318

13181319
subflow_request_sock_ipv4_ops = tcp_request_sock_ipv4_ops;

0 commit comments

Comments
 (0)