[PATCH v2] [iptables] include: netfilter: add xt_LOG.h to fix an include error on Linux < 3.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



libxt_LOG.c:6:10: fatal error: linux/netfilter/xt_LOG.h: No such file or directory
. #include <linux/netfilter/xt_LOG.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~

Linux < 3.4 defines are in include/linux/netfilter_ipv{4,6}/ipt_LOG.h,
but the naming is slightly different, so just define it here as the values are the same.

https://github.com/torvalds/linux/commit/6939c33a757bd006c5e0b8b5fd429fc587a4d0f4

Took the source from Linux v6.2.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@xxxxxxxxx>
---
v2: added the xt_LOG.h header rather than fixing /extensions/libxt_LOG.c
---
 include/linux/netfilter/xt_LOG.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 include/linux/netfilter/xt_LOG.h

diff --git a/include/linux/netfilter/xt_LOG.h b/include/linux/netfilter/xt_LOG.h
new file mode 100644
index 00000000..167d4ddd
--- /dev/null
+++ b/include/linux/netfilter/xt_LOG.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _XT_LOG_H
+#define _XT_LOG_H
+
+/* make sure not to change this without changing nf_log.h:NF_LOG_* (!) */
+#define XT_LOG_TCPSEQ		0x01	/* Log TCP sequence numbers */
+#define XT_LOG_TCPOPT		0x02	/* Log TCP options */
+#define XT_LOG_IPOPT		0x04	/* Log IP options */
+#define XT_LOG_UID		0x08	/* Log UID owning local socket */
+#define XT_LOG_NFLOG		0x10	/* Unsupported, don't reuse */
+#define XT_LOG_MACDECODE	0x20	/* Decode MAC header */
+#define XT_LOG_MASK		0x2f
+
+struct xt_log_info {
+	unsigned char level;
+	unsigned char logflags;
+	char prefix[30];
+};
+
+#endif /* _XT_LOG_H */
-- 
2.39.2




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux