From: jow Date: Sat, 2 May 2009 03:34:11 +0000 (+0000) Subject: [packages] linuxigd: patch for iptables 1.4.3.2 compatibility X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=81963fefdd99e021c0d6069dc2ad9b13cc2d790a;p=packages.git [packages] linuxigd: patch for iptables 1.4.3.2 compatibility git-svn-id: svn://svn.openwrt.org/openwrt/packages@15554 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile index ce7ef3578..67f40e05d 100644 --- a/net/linuxigd/Makefile +++ b/net/linuxigd/Makefile @@ -26,7 +26,7 @@ define Package/linuxigd SECTION:=net CATEGORY:=Network TITLE:=UPnP daemon - DEPENDS:=+libupnp +libpthread + DEPENDS:=+libiptc +libupnp +libpthread URL:=http://linux-igd.sourceforge.net/ endef diff --git a/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch b/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch new file mode 100644 index 000000000..6587aaf73 --- /dev/null +++ b/net/linuxigd/patches/004-iptables-1.4.3.2-compat.patch @@ -0,0 +1,85 @@ +Only in linuxigd-1.0.orig/: .prepared_20a157cc75a461190fa4391263121d27 +Only in linuxigd-1.0: .prepared_b973ef33b8631d87e6b3e8221cc78739 +diff -ur linuxigd-1.0.orig/iptc.c linuxigd-1.0/iptc.c +--- linuxigd-1.0.orig/iptc.c 2009-05-02 04:45:15.000000000 +0200 ++++ linuxigd-1.0/iptc.c 2009-05-02 05:28:01.000000000 +0200 +@@ -17,6 +17,8 @@ + #include "util.h" + #include "iptc.h" + ++#define IPTC_HANDLE struct iptc_handle * ++ + struct ipt_natinfo + { + struct ipt_entry_target t; +@@ -49,7 +51,7 @@ + const char *dnat_to, + const int append) + { +- iptc_handle_t handle; ++ IPTC_HANDLE handle; + struct ipt_entry *chain_entry; + struct ipt_entry_match *entry_match = NULL; + struct ipt_entry_target *entry_target = NULL; +@@ -126,15 +128,15 @@ + return; + } + if (append) +- result = iptc_append_entry(labelit, chain_entry, &handle); ++ result = iptc_append_entry(labelit, chain_entry, handle); + else +- result = iptc_insert_entry(labelit, chain_entry, 0, &handle); ++ result = iptc_insert_entry(labelit, chain_entry, 0, handle); + + if (!result) { + trace(1, "libiptc error: Can't add, %s", iptc_strerror(errno)); + return; + } +- result = iptc_commit(&handle); ++ result = iptc_commit(handle); + if (!result) { + trace(1, "libiptc error: Commit error, %s", iptc_strerror(errno)); + return; +@@ -159,7 +161,7 @@ + const char *target, + const char *dnat_to) + { +- iptc_handle_t handle; ++ IPTC_HANDLE handle; + const struct ipt_entry *e; + ipt_chainlabel labelit; + int i, result; +@@ -182,7 +184,7 @@ + } + + /* check through rules to find match */ +- for (e = iptc_first_rule(chain, &handle), i=0; e; e = iptc_next_rule(e, &handle), i++) { ++ for (e = iptc_first_rule(chain, handle), i=0; e; e = iptc_next_rule(e, handle), i++) { + if (s_src != INADDR_NONE && e->ip.src.s_addr != s_src) continue; + if (s_dest != INADDR_NONE && e->ip.dst.s_addr != s_dest) continue; + if (iniface && strcmp(e->ip.iniface, iniface) != 0) continue; +@@ -190,7 +192,7 @@ + if (protocol && strcmp(protocol, "TCP") == 0 && e->ip.proto != IPPROTO_TCP) continue; + if (protocol && strcmp(protocol, "UDP") == 0 && e->ip.proto != IPPROTO_UDP) continue; + if ((srcports || destports) && IPT_MATCH_ITERATE(e, matchcmp, srcports, destports) == 0) continue; +- if (target && strcmp(target, iptc_get_target(e, &handle)) != 0) continue; ++ if (target && strcmp(target, iptc_get_target(e, handle)) != 0) continue; + if (dnat_to && strcmp(target, "DNAT") == 0) { + struct ipt_entry_target *t; + struct ip_nat_multi_range *mr; +@@ -214,12 +216,12 @@ + break; + } + if (!e) return; +- result = iptc_delete_num_entry(chain, i, &handle); ++ result = iptc_delete_num_entry(chain, i, handle); + if (!result) { + trace(1, "libiptc error: Delete error, %s", iptc_strerror(errno)); + return; + } +- result = iptc_commit(&handle); ++ result = iptc_commit(handle); + if (!result) { + trace(1, "libiptc error: Commit error, %s", iptc_strerror(errno)); + return; +Only in linuxigd-1.0: iptc.o