Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f964629e authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

tcp: constify tcp_v{4|6}_route_req() sock argument



These functions do not change the listener socket.
Goal is to make sure tcp_conn_request() is not messing with
listener in a racy way.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f684b4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1711,7 +1711,7 @@ struct tcp_request_sock_ops {
	__u32 (*cookie_init_seq)(const struct sk_buff *skb,
				 __u16 *mss);
#endif
	struct dst_entry *(*route_req)(struct sock *sk, struct flowi *fl,
	struct dst_entry *(*route_req)(const struct sock *sk, struct flowi *fl,
				       const struct request_sock *req,
				       bool *strict);
	__u32 (*init_seq)(const struct sk_buff *skb);
+2 −1
Original line number Diff line number Diff line
@@ -1180,7 +1180,8 @@ static void tcp_v4_init_req(struct request_sock *req,
	ireq->opt = tcp_v4_save_options(skb);
}

static struct dst_entry *tcp_v4_route_req(struct sock *sk, struct flowi *fl,
static struct dst_entry *tcp_v4_route_req(const struct sock *sk,
					  struct flowi *fl,
					  const struct request_sock *req,
					  bool *strict)
{
+2 −1
Original line number Diff line number Diff line
@@ -689,7 +689,8 @@ static void tcp_v6_init_req(struct request_sock *req,
	}
}

static struct dst_entry *tcp_v6_route_req(struct sock *sk, struct flowi *fl,
static struct dst_entry *tcp_v6_route_req(const struct sock *sk,
					  struct flowi *fl,
					  const struct request_sock *req,
					  bool *strict)
{