Update linuxigd to 1.0, fix compilation
authorFlorian Fainelli <florian@openwrt.org>
Sat, 2 Jun 2007 10:21:15 +0000 (10:21 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 2 Jun 2007 10:21:15 +0000 (10:21 +0000)
SVN-Revision: 7446

net/linuxigd/Makefile
net/linuxigd/patches/001-iptables_defs.patch [new file with mode: 0644]

index d50f1ede63f07a896e4fb6eb5908b6df7c9cb6e4..3940b9fedaac1413e698f3bb78e6f22df7d6bcc0 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linuxigd
-PKG_VERSION:=0.95
+PKG_VERSION:=1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/linux-igd
-PKG_MD5SUM:=0f203a2db5e3fb01496b73e417dbd9a6
+PKG_MD5SUM:=929f5c4878c91d534613b7c7070215d9
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
diff --git a/net/linuxigd/patches/001-iptables_defs.patch b/net/linuxigd/patches/001-iptables_defs.patch
new file mode 100644 (file)
index 0000000..0cee3c0
--- /dev/null
@@ -0,0 +1,73 @@
+diff -urN linuxigd-1.0/iptc.c linuxigd-1.0.new/iptc.c
+--- linuxigd-1.0/iptc.c        2006-09-11 17:55:48.000000000 +0200
++++ linuxigd-1.0.new/iptc.c    2007-06-02 12:24:34.000000000 +0200
+@@ -22,9 +22,9 @@
+ struct ipt_entry_match *get_udp_match(const char *sports, const char *dports, unsigned int *nfcache);
+ struct ipt_entry_target *get_dnat_target(const char *input, unsigned int *nfcache);
+-static u_int16_t parse_port(const char *port);
+-static void parse_ports(const char *portstring, u_int16_t *ports);
+-static int service_to_port(const char *name);
++static u_int16_t igd_parse_port(const char *port);
++void parse_ports(const char *portstring, u_int16_t *ports);
++static int igd_service_to_port(const char *name);
+ static void parse_range(const char *input, struct ip_nat_range *range);
+ static struct ipt_natinfo *append_range(struct ipt_natinfo *info, const struct ip_nat_range *range);
+@@ -336,13 +336,12 @@
+ }
+ /* Copied and modified from libipt_tcp.c and libipt_udp.c */
+-
+ static u_int16_t
+-parse_port(const char *port)
++igd_parse_port(const char *port)
+ {
+       unsigned int portnum;
+-      if ((portnum = service_to_port(port)) != -1) {
++      if ((portnum = igd_service_to_port(port)) != -1) {
+               return (u_int16_t)portnum;
+       }
+       else {
+@@ -350,7 +349,7 @@
+       }
+ }
+-static void
++void
+ parse_ports(const char *portstring, u_int16_t *ports)
+ {
+       char *buffer;
+@@ -358,19 +357,18 @@
+       buffer = strdup(portstring);
+       if ((cp = strchr(buffer, ':')) == NULL)
+-              ports[0] = ports[1] = parse_port(buffer);
++              ports[0] = ports[1] = igd_parse_port(buffer);
+       else {
+               *cp = '\0';
+               cp++;
+-              ports[0] = buffer[0] ? parse_port(buffer) : 0;
+-              ports[1] = cp[0] ? parse_port(cp) : 0xFFFF;
++              ports[0] = buffer[0] ? igd_parse_port(buffer) : 0;
++              ports[1] = cp[0] ? igd_parse_port(cp) : 0xFFFF;
+       }
+       free(buffer);
+ }
+-
+ static int
+-service_to_port(const char *name)
++igd_service_to_port(const char *name)
+ {
+       struct servent *service;
+@@ -382,7 +380,6 @@
+-
+ /* Copied and modified from libipt_DNAT.c */
+ static void