6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
The char * to unsigned char * change happened for the libnetfilter_queue
1.0.0 release, not the linux headers.
So drop the linux headers version check since it causes more harm than
good by trying the old API when the toolchain uses old linux headers
with a new-enough libnetfilter_queue.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
diff -Nura norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp norm-1.5r6/protolib/src/linux/linuxDetour.cpp
--- norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp 2016-03-31 10:17:20.674745597 -0300
+++ norm-1.5r6/protolib/src/linux/linuxDetour.cpp 2016-03-31 10:36:58.923084395 -0300
@@ -16,8 +16,6 @@
#include <linux/if_ether.h> // for ETH_P_IP
#include <net/if_arp.h> // for ARPHRD_ETHER
-#include <linux/version.h> // for LINUX_VERSION_CODE
-
/** NOTES:
*
* 1) This newer implementation of LinuxDetour uses netfilter_queue
@@ -591,17 +589,7 @@
// Finally record packet length and cache pointer to IP packet data
- // A change to the nfq_get_payload() prototype seemed to kick in around Linux header files
- // version 3.6? (This will probably need to be fine tuned for the right version threshold.)
-
-#define LINUX_VERSION_MAJOR (LINUX_VERSION_CODE/65536)
-#define LINUX_VERSION_MINOR ((LINUX_VERSION_CODE - (LINUX_VERSION_MAJOR*65536)) / 256)
-
-#if ((LINUX_VERSION_MAJOR > 3) || ((LINUX_VERSION_MAJOR == 3) && (LINUX_VERSION_MINOR > 5)))
linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, (unsigned char**)(&linuxDetour->nfq_pkt_data));
-#else
- linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, &linuxDetour->nfq_pkt_data);
-#endif //
return 0;
} // end LinuxDetour::NfqCallback()
|