Skip to content

Commit 57b4755

Browse files
Octavian Purdiladavem330
authored andcommitted
tcp: cookie_v4_init_sequence: skb should be const
Signed-off-by: Octavian Purdila <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c1c27fb commit 57b4755

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/net/tcp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,11 @@ static inline u32 tcp_cookie_time(void)
493493

494494
u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
495495
u16 *mssp);
496-
__u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mss);
496+
__u32 cookie_v4_init_sequence(struct sock *sk, const struct sk_buff *skb,
497+
__u16 *mss);
497498
#else
498499
static inline __u32 cookie_v4_init_sequence(struct sock *sk,
499-
struct sk_buff *skb,
500+
const struct sk_buff *skb,
500501
__u16 *mss)
501502
{
502503
return 0;

net/ipv4/syncookies.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
170170
}
171171
EXPORT_SYMBOL_GPL(__cookie_v4_init_sequence);
172172

173-
__u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mssp)
173+
__u32 cookie_v4_init_sequence(struct sock *sk, const struct sk_buff *skb,
174+
__u16 *mssp)
174175
{
175176
const struct iphdr *iph = ip_hdr(skb);
176177
const struct tcphdr *th = tcp_hdr(skb);

0 commit comments

Comments
 (0)