netfilter: synproxy: add common uapi for SYNPROXY infrastructure
authorFernando Fernandez Mancera <ffmancera@riseup.net>
Fri, 7 Jun 2019 00:36:02 +0000 (02:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Jun 2019 15:10:38 +0000 (17:10 +0200)
This new UAPI file is going to be used by the xt and nft common SYNPROXY
infrastructure. It is needed to avoid duplicated code.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_SYNPROXY.h [new file with mode: 0644]
include/uapi/linux/netfilter/xt_SYNPROXY.h

diff --git a/include/uapi/linux/netfilter/nf_SYNPROXY.h b/include/uapi/linux/netfilter/nf_SYNPROXY.h
new file mode 100644 (file)
index 0000000..068d1b3
--- /dev/null
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _NF_SYNPROXY_H
+#define _NF_SYNPROXY_H
+
+#include <linux/types.h>
+
+#define NF_SYNPROXY_OPT_MSS            0x01
+#define NF_SYNPROXY_OPT_WSCALE         0x02
+#define NF_SYNPROXY_OPT_SACK_PERM      0x04
+#define NF_SYNPROXY_OPT_TIMESTAMP      0x08
+#define NF_SYNPROXY_OPT_ECN            0x10
+
+struct nf_synproxy_info {
+       __u8    options;
+       __u8    wscale;
+       __u16   mss;
+};
+
+#endif /* _NF_SYNPROXY_H */
index ea5eba15d4c1be75ad1bf5b0c1234a02826cf90a..4d5611d647dfec6f7875856736f88bdbd04cb5cf 100644 (file)
@@ -2,18 +2,14 @@
 #ifndef _XT_SYNPROXY_H
 #define _XT_SYNPROXY_H
 
-#include <linux/types.h>
+#include <linux/netfilter/nf_SYNPROXY.h>
 
-#define XT_SYNPROXY_OPT_MSS            0x01
-#define XT_SYNPROXY_OPT_WSCALE         0x02
-#define XT_SYNPROXY_OPT_SACK_PERM      0x04
-#define XT_SYNPROXY_OPT_TIMESTAMP      0x08
-#define XT_SYNPROXY_OPT_ECN            0x10
+#define XT_SYNPROXY_OPT_MSS            NF_SYNPROXY_OPT_MSS
+#define XT_SYNPROXY_OPT_WSCALE         NF_SYNPROXY_OPT_WSCALE
+#define XT_SYNPROXY_OPT_SACK_PERM      NF_SYNPROXY_OPT_SACK_PERM
+#define XT_SYNPROXY_OPT_TIMESTAMP      NF_SYNPROXY_OPT_TIMESTAMP
+#define XT_SYNPROXY_OPT_ECN            NF_SYNPROXY_OPT_ECN
 
-struct xt_synproxy_info {
-       __u8    options;
-       __u8    wscale;
-       __u16   mss;
-};
+#define xt_synproxy_info               nf_synproxy_info
 
 #endif /* _XT_SYNPROXY_H */