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

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

tcp/dccp: constify send_synack and send_reset socket argument



None of these functions need to change the socket, make it
const.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c7e622d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,9 +34,9 @@ struct request_sock_ops {
	char		*slab_name;
	int		(*rtx_syn_ack)(const struct sock *sk,
				       struct request_sock *req);
	void		(*send_ack)(struct sock *sk, struct sk_buff *skb,
	void		(*send_ack)(const struct sock *sk, struct sk_buff *skb,
				    struct request_sock *req);
	void		(*send_reset)(struct sock *sk,
	void		(*send_reset)(const struct sock *sk,
				      struct sk_buff *skb);
	void		(*destructor)(struct request_sock *req);
	void		(*syn_ack_timeout)(const struct request_sock *req);
+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb);
int dccp_retransmit_skb(struct sock *sk);

void dccp_send_ack(struct sock *sk);
void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
void dccp_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,
			 struct request_sock *rsk);

void dccp_send_sync(struct sock *sk, const u64 seq,
+1 −1
Original line number Diff line number Diff line
@@ -527,7 +527,7 @@ static int dccp_v4_send_response(const struct sock *sk, struct request_sock *req
	return err;
}

static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
static void dccp_v4_ctl_send_reset(const struct sock *sk, struct sk_buff *rxskb)
{
	int err;
	const struct iphdr *rxiph;
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ static void dccp_v6_reqsk_destructor(struct request_sock *req)
	kfree_skb(inet_rsk(req)->pktopts);
}

static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
static void dccp_v6_ctl_send_reset(const struct sock *sk, struct sk_buff *rxskb)
{
	const struct ipv6hdr *rxip6h;
	struct sk_buff *skb;
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ int dccp_child_process(struct sock *parent, struct sock *child,

EXPORT_SYMBOL_GPL(dccp_child_process);

void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
void dccp_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,
			 struct request_sock *rsk)
{
	DCCP_BUG("DCCP-ACK packets are never sent in LISTEN/RESPOND state");
Loading