Skip to content

Commit

Permalink
inet: constify inet_rtx_syn_ack() sock argument
Browse files Browse the repository at this point in the history
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: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 25, 2015
1 parent ea3bea3 commit 1b70e97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/request_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct request_sock_ops {
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
*/
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ static inline void syn_ack_recalc(struct request_sock *req, const int thresh,
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);

Expand Down

0 comments on commit 1b70e97

Please sign in to comment.