xtables-addons: fix endian detection in iptables-mod-geoip (#11408)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@34387 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4ee2c1e736
commit
fb183b1175
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=xtables-addons
|
||||
PKG_VERSION:=1.45
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_MD5SUM:=802d2f556a5e545f44e4b69937bf8490
|
||||
|
18
net/xtables-addons/patches/300-geoip-endian-detection.patch
Normal file
18
net/xtables-addons/patches/300-geoip-endian-detection.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/extensions/libxt_geoip.c
|
||||
+++ b/extensions/libxt_geoip.c
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
/* Use simple integer vector files */
|
||||
if (nfproto == NFPROTO_IPV6) {
|
||||
-#if __BYTE_ORDER == _BIG_ENDIAN
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv6", code);
|
||||
#else
|
||||
snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv6", code);
|
||||
#endif
|
||||
} else {
|
||||
-#if __BYTE_ORDER == _BIG_ENDIAN
|
||||
+#if BYTE_ORDER == BIG_ENDIAN
|
||||
snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/BE/%s.iv4", code);
|
||||
#else
|
||||
snprintf(buf, sizeof(buf), GEOIP_DB_DIR "/LE/%s.iv4", code);
|
Loading…
x
Reference in New Issue
Block a user