xtables-addons: fix endian detection in iptables-mod-geoip (#11408)
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 26 Nov 2012 15:10:14 +0000 (15:10 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 26 Nov 2012 15:10:14 +0000 (15:10 +0000)
SVN-Revision: 34387

net/xtables-addons/Makefile
net/xtables-addons/patches/300-geoip-endian-detection.patch [new file with mode: 0644]

index 4d3af5404bc1a649a3c52d99a4eafadd049a248e..07a864fab6fdf28fd3bb95e474780b5ac0acb270 100644 (file)
@@ -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
diff --git a/net/xtables-addons/patches/300-geoip-endian-detection.patch b/net/xtables-addons/patches/300-geoip-endian-detection.patch
new file mode 100644 (file)
index 0000000..9957f74
--- /dev/null
@@ -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);