diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/request_sock.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 0369f98e9f3a..b220b5f624de 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -45,7 +45,7 @@ struct request_sock { | |||
45 | struct request_sock *dl_next; /* Must be first member! */ | 45 | struct request_sock *dl_next; /* Must be first member! */ |
46 | u16 mss; | 46 | u16 mss; |
47 | u8 retrans; | 47 | u8 retrans; |
48 | u8 __pad; | 48 | u8 cookie_ts; /* syncookie: encode tcpopts in timestamp */ |
49 | /* The following two fields can be easily recomputed I think -AK */ | 49 | /* The following two fields can be easily recomputed I think -AK */ |
50 | u32 window_clamp; /* window clamp at creation time */ | 50 | u32 window_clamp; /* window clamp at creation time */ |
51 | u32 rcv_wnd; /* rcv_wnd offered first time */ | 51 | u32 rcv_wnd; /* rcv_wnd offered first time */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 723b36851dde..7b41bb962b9c 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -442,6 +442,9 @@ extern struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
442 | extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, | 442 | extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, |
443 | __u16 *mss); | 443 | __u16 *mss); |
444 | 444 | ||
445 | extern __u32 cookie_init_timestamp(struct request_sock *req); | ||
446 | extern void cookie_check_timestamp(struct tcp_options_received *tcp_opt); | ||
447 | |||
445 | /* From net/ipv6/syncookies.c */ | 448 | /* From net/ipv6/syncookies.c */ |
446 | extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); | 449 | extern struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb); |
447 | extern __u32 cookie_v6_init_sequence(struct sock *sk, struct sk_buff *skb, | 450 | extern __u32 cookie_v6_init_sequence(struct sock *sk, struct sk_buff *skb, |
@@ -956,6 +959,7 @@ static inline void tcp_openreq_init(struct request_sock *req, | |||
956 | struct inet_request_sock *ireq = inet_rsk(req); | 959 | struct inet_request_sock *ireq = inet_rsk(req); |
957 | 960 | ||
958 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ | 961 | req->rcv_wnd = 0; /* So that tcp_send_synack() knows! */ |
962 | req->cookie_ts = 0; | ||
959 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; | 963 | tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq; |
960 | req->mss = rx_opt->mss_clamp; | 964 | req->mss = rx_opt->mss_clamp; |
961 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; | 965 | req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0; |