|
@@ -495,13 +495,6 @@ u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
|
|
|
u16 *mssp);
|
|
|
__u32 cookie_v4_init_sequence(struct sock *sk, const struct sk_buff *skb,
|
|
|
__u16 *mss);
|
|
|
-#else
|
|
|
-static inline __u32 cookie_v4_init_sequence(struct sock *sk,
|
|
|
- const struct sk_buff *skb,
|
|
|
- __u16 *mss)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
#endif
|
|
|
|
|
|
__u32 cookie_init_timestamp(struct request_sock *req);
|
|
@@ -517,13 +510,6 @@ u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
|
|
|
const struct tcphdr *th, u16 *mssp);
|
|
|
__u32 cookie_v6_init_sequence(struct sock *sk, const struct sk_buff *skb,
|
|
|
__u16 *mss);
|
|
|
-#else
|
|
|
-static inline __u32 cookie_v6_init_sequence(struct sock *sk,
|
|
|
- struct sk_buff *skb,
|
|
|
- __u16 *mss)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
#endif
|
|
|
/* tcp_output.c */
|
|
|
|
|
@@ -1615,8 +1601,28 @@ struct tcp_request_sock_ops {
|
|
|
#endif
|
|
|
void (*init_req)(struct request_sock *req, struct sock *sk,
|
|
|
struct sk_buff *skb);
|
|
|
+#ifdef CONFIG_SYN_COOKIES
|
|
|
+ __u32 (*cookie_init_seq)(struct sock *sk, const struct sk_buff *skb,
|
|
|
+ __u16 *mss);
|
|
|
+#endif
|
|
|
};
|
|
|
|
|
|
+#ifdef CONFIG_SYN_COOKIES
|
|
|
+static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops,
|
|
|
+ struct sock *sk, struct sk_buff *skb,
|
|
|
+ __u16 *mss)
|
|
|
+{
|
|
|
+ return ops->cookie_init_seq(sk, skb, mss);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops,
|
|
|
+ struct sock *sk, struct sk_buff *skb,
|
|
|
+ __u16 *mss)
|
|
|
+{
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
int tcpv4_offload_init(void);
|
|
|
|
|
|
void tcp_v4_init(void);
|