[PATCH libnetfilter_queue v2] src: Stop users from accidentally using legacy linux_nfnetlink_queue.h

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

 



If a user coded
  #include <libnetfilter_queue/libnetfilter_queue.h>
  #include <linux/netfilter/nfnetlink_queue.h>
then instead of nfnetlink_queue.h they would get linux_nfnetlink_queue.h.
In the library, this only affects libnetfilter_queue.c

Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx>
---
 include/libnetfilter_queue/libnetfilter_queue.h | 2 --
 src/libnetfilter_queue.c                        | 1 +
 utils/nfqnl_test.c                              | 1 +
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/libnetfilter_queue/libnetfilter_queue.h b/include/libnetfilter_queue/libnetfilter_queue.h
index a19122f..42a3a45 100644
--- a/include/libnetfilter_queue/libnetfilter_queue.h
+++ b/include/libnetfilter_queue/libnetfilter_queue.h
@@ -16,8 +16,6 @@
 #include <sys/time.h>
 #include <libnfnetlink/libnfnetlink.h>
 
-#include <libnetfilter_queue/linux_nfnetlink_queue.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index ef3b211..899c765 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -32,6 +32,7 @@
 
 #include <libnfnetlink/libnfnetlink.h>
 #include <libnetfilter_queue/libnetfilter_queue.h>
+#include <libnetfilter_queue/linux_nfnetlink_queue.h>
 #include "internal.h"
 
 /**
diff --git a/utils/nfqnl_test.c b/utils/nfqnl_test.c
index 5e76ffe..682f3d7 100644
--- a/utils/nfqnl_test.c
+++ b/utils/nfqnl_test.c
@@ -5,6 +5,7 @@
 #include <netinet/in.h>
 #include <linux/types.h>
 #include <linux/netfilter.h>		/* for NF_ACCEPT */
+#include <linux/netfilter/nfnetlink_queue.h>
 #include <errno.h>
 
 #include <libnetfilter_queue/libnetfilter_queue.h>
-- 
2.17.5




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

  Powered by Linux