netfilter: synproxy: move code between headers.
authorJeremy Sowden <jeremy@azazel.net>
Fri, 13 Sep 2019 08:13:08 +0000 (09:13 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 Sep 2019 10:34:43 +0000 (12:34 +0200)
There is some non-conntrack code in the nf_conntrack_synproxy.h header.
Move it to the nf_synproxy.h header.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_synproxy.h
include/net/netfilter/nf_synproxy.h

index 2f0171d249974a14e94c24a30838f1fd53836c9c..c22f0c11cc826acd8e501414750f76f8716e409d 100644 (file)
@@ -43,43 +43,4 @@ static inline bool nf_ct_add_synproxy(struct nf_conn *ct,
        return true;
 }
 
-struct synproxy_stats {
-       unsigned int                    syn_received;
-       unsigned int                    cookie_invalid;
-       unsigned int                    cookie_valid;
-       unsigned int                    cookie_retrans;
-       unsigned int                    conn_reopened;
-};
-
-struct synproxy_net {
-       struct nf_conn                  *tmpl;
-       struct synproxy_stats __percpu  *stats;
-       unsigned int                    hook_ref4;
-       unsigned int                    hook_ref6;
-};
-
-extern unsigned int synproxy_net_id;
-static inline struct synproxy_net *synproxy_pernet(struct net *net)
-{
-       return net_generic(net, synproxy_net_id);
-}
-
-struct synproxy_options {
-       u8                              options;
-       u8                              wscale;
-       u16                             mss_option;
-       u16                             mss_encode;
-       u32                             tsval;
-       u32                             tsecr;
-};
-
-struct tcphdr;
-struct nf_synproxy_info;
-bool synproxy_parse_options(const struct sk_buff *skb, unsigned int doff,
-                           const struct tcphdr *th,
-                           struct synproxy_options *opts);
-
-void synproxy_init_timestamp_cookie(const struct nf_synproxy_info *info,
-                                   struct synproxy_options *opts);
-
 #endif /* _NF_CONNTRACK_SYNPROXY_H */
index dc420b47e3aa963fad504956d316b41e2ca629e4..19d1af7a0348fa9eebb7fd5696667f19a5c2f8e3 100644 (file)
 #include <net/netfilter/nf_conntrack_seqadj.h>
 #include <net/netfilter/nf_conntrack_synproxy.h>
 
+struct synproxy_stats {
+       unsigned int                    syn_received;
+       unsigned int                    cookie_invalid;
+       unsigned int                    cookie_valid;
+       unsigned int                    cookie_retrans;
+       unsigned int                    conn_reopened;
+};
+
+struct synproxy_net {
+       struct nf_conn                  *tmpl;
+       struct synproxy_stats __percpu  *stats;
+       unsigned int                    hook_ref4;
+       unsigned int                    hook_ref6;
+};
+
+extern unsigned int synproxy_net_id;
+static inline struct synproxy_net *synproxy_pernet(struct net *net)
+{
+       return net_generic(net, synproxy_net_id);
+}
+
+struct synproxy_options {
+       u8                              options;
+       u8                              wscale;
+       u16                             mss_option;
+       u16                             mss_encode;
+       u32                             tsval;
+       u32                             tsecr;
+};
+
+struct nf_synproxy_info;
+bool synproxy_parse_options(const struct sk_buff *skb, unsigned int doff,
+                           const struct tcphdr *th,
+                           struct synproxy_options *opts);
+
+void synproxy_init_timestamp_cookie(const struct nf_synproxy_info *info,
+                                   struct synproxy_options *opts);
+
 void synproxy_send_client_synack(struct net *net, const struct sk_buff *skb,
                                 const struct tcphdr *th,
                                 const struct synproxy_options *opts);