Commit 1b70e977 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

inet: constify inet_rtx_syn_ack() sock argument

SYNACK packets are sent on behalf on unlocked listeners
or fastopen sockets. Mark socket as const to catch future changes
that might break the assumption.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea3bea3a
...@@ -42,7 +42,7 @@ struct request_sock_ops { ...@@ -42,7 +42,7 @@ struct request_sock_ops {
void (*syn_ack_timeout)(const struct request_sock *req); void (*syn_ack_timeout)(const struct request_sock *req);
}; };
int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req); int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req);
/* struct request_sock - mini sock to represent a connection request /* struct request_sock - mini sock to represent a connection request
*/ */
......
...@@ -563,7 +563,7 @@ static inline void syn_ack_recalc(struct request_sock *req, const int thresh, ...@@ -563,7 +563,7 @@ static inline void syn_ack_recalc(struct request_sock *req, const int thresh,
req->num_timeout >= rskq_defer_accept - 1; req->num_timeout >= rskq_defer_accept - 1;
} }
int inet_rtx_syn_ack(struct sock *parent, struct request_sock *req) int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req)
{ {
int err = req->rsk_ops->rtx_syn_ack(parent, req); int err = req->rsk_ops->rtx_syn_ack(parent, req);
......
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