From 4495dffed87805941a92609621cf48c310c53a36 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 2 Jun 2007 10:21:15 +0000 Subject: [PATCH] Update linuxigd to 1.0, fix compilation SVN-Revision: 7446 --- net/linuxigd/Makefile | 4 +- net/linuxigd/patches/001-iptables_defs.patch | 73 ++++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 net/linuxigd/patches/001-iptables_defs.patch diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile index d50f1ede63..3940b9feda 100644 --- a/net/linuxigd/Makefile +++ b/net/linuxigd/Makefile @@ -10,12 +10,12 @@ 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 index 0000000000..0cee3c02d4 --- /dev/null +++ b/net/linuxigd/patches/001-iptables_defs.patch @@ -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 -- 2.30.2