Commit 0e8642cf authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: fix build fong CONFIG_MPTCP=n

Fixes these errors:

net/ipv4/syncookies.c: In function 'tcp_get_cookie_sock':
net/ipv4/syncookies.c:216:19: error: 'struct tcp_request_sock' has no
member named 'drop_req'
  216 |   if (tcp_rsk(req)->drop_req) {
      |                   ^~
net/ipv4/syncookies.c: In function 'cookie_tcp_reqsk_alloc':
net/ipv4/syncookies.c:289:27: warning: unused variable 'treq'
[-Wunused-variable]
  289 |  struct tcp_request_sock *treq;
      |                           ^~~~
make[3]: *** [scripts/Makefile.build:280: net/ipv4/syncookies.o] Error 1
make[3]: *** Waiting for unfinished jobs....

Fixes: 9466a1cc ("mptcp: enable JOIN requests even if cookies are in use")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Florian Westphal <fw@strlen.de>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f3de75c
...@@ -213,7 +213,7 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb, ...@@ -213,7 +213,7 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,
tcp_sk(child)->tsoffset = tsoff; tcp_sk(child)->tsoffset = tsoff;
sock_rps_save_rxhash(child, skb); sock_rps_save_rxhash(child, skb);
if (tcp_rsk(req)->drop_req) { if (rsk_drop_req(req)) {
refcount_set(&req->rsk_refcnt, 2); refcount_set(&req->rsk_refcnt, 2);
return child; return child;
} }
...@@ -286,10 +286,11 @@ struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops, ...@@ -286,10 +286,11 @@ struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops,
struct sock *sk, struct sock *sk,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct tcp_request_sock *treq;
struct request_sock *req; struct request_sock *req;
#ifdef CONFIG_MPTCP #ifdef CONFIG_MPTCP
struct tcp_request_sock *treq;
if (sk_is_mptcp(sk)) if (sk_is_mptcp(sk))
ops = &mptcp_subflow_request_sock_ops; ops = &mptcp_subflow_request_sock_ops;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment