netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Sowden <jeremy@azazel.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@netfilter.org>,
	Florian Westphal <fw@strlen.de>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH nf-next 15/29] netfilter: move code between synproxy headers.
Date: Sun,  1 Sep 2019 21:51:11 +0100	[thread overview]
Message-ID: <20190901205126.6935-16-jeremy@azazel.net> (raw)
In-Reply-To: <20190901205126.6935-1-jeremy@azazel.net>

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>
---
 include/net/netfilter/nf_conntrack_synproxy.h | 39 -------------------
 include/net/netfilter/nf_synproxy.h           | 38 ++++++++++++++++++
 2 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack_synproxy.h b/include/net/netfilter/nf_conntrack_synproxy.h
index 2f0171d24997..c22f0c11cc82 100644
--- a/include/net/netfilter/nf_conntrack_synproxy.h
+++ b/include/net/netfilter/nf_conntrack_synproxy.h
@@ -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 */
diff --git a/include/net/netfilter/nf_synproxy.h b/include/net/netfilter/nf_synproxy.h
index dc420b47e3aa..19d1af7a0348 100644
--- a/include/net/netfilter/nf_synproxy.h
+++ b/include/net/netfilter/nf_synproxy.h
@@ -11,6 +11,44 @@
 #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);
-- 
2.23.0.rc1


  parent reply	other threads:[~2019-09-01 21:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01 20:50 [PATCH nf-next 00/29] Add config option checks to netfilter headers Jeremy Sowden
2019-09-01 20:50 ` [PATCH nf-next 01/29] netfilter: add include guard to nf_conntrack_h323_types.h Jeremy Sowden
2019-09-01 20:50 ` [PATCH nf-next 02/29] netfilter: add include guard to nf_conntrack_labels.h Jeremy Sowden
2019-09-01 20:50 ` [PATCH nf-next 03/29] netfilter: fix include guard comment Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 04/29] netfilter: add GPL-2.0 SPDX ID's to a couple of headers Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 05/29] netfilter: remove trailing white-space Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 06/29] netfilter: fix Kconfig formatting error Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 07/29] netfilter: remove stray semicolons Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 08/29] netfilter: remove unused function declarations Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 09/29] netfilter: remove unused includes Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 10/29] netfilter: include the right header in nf_conntrack_zones.h Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 11/29] netfilter: added missing includes Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 12/29] netfilter: inline three headers Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 13/29] netfilter: remove superfluous header Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 14/29] netfilter: move inline function to a more appropriate header Jeremy Sowden
2019-09-01 20:51 ` Jeremy Sowden [this message]
2019-09-01 20:51 ` [PATCH nf-next 16/29] netfilter: move struct definition " Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 17/29] netfilter: use consistent style when defining inline functions in nf_conntrack_ecache.h Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 18/29] netfilter: replace defined(CONFIG...) || defined(CONFIG...MODULE) with IS_ENABLED(CONFIG...) Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 19/29] netfilter: wrap union nf_conntrack_proto members in CONFIG_NF_CT_PROTO_* check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 20/29] netfilter: wrap inline synproxy function in CONFIG_NETFILTER_SYNPROXY check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 21/29] netfilter: wrap inline timeout function in CONFIG_NETFILTER_TIMEOUT check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 22/29] netfilter: wrap some nat-related conntrack code in a CONFIG_NF_NAT check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 23/29] netfilter: wrap some ipv6 tables code in a CONFIG_NF_TABLES_IPV6 check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 24/29] netfilter: wrap some conntrack code in a CONFIG_NF_CONNTRACK check Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 25/29] netfilter: add CONFIG_NETFILTER check to linux/netfilter.h Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 26/29] netfilter: add NF_TPROXY config option Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 27/29] netfilter: add IP_SET_BITMAP " Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 28/29] netfilter: add IP_SET_HASH " Jeremy Sowden
2019-09-01 20:51 ` [PATCH nf-next 29/29] netfilter: wrap headers in CONFIG checks Jeremy Sowden
2019-09-02  6:28   ` kbuild test robot
2019-09-02  6:38   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190901205126.6935-16-jeremy@azazel.net \
    --to=jeremy@azazel.net \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).