From ffc299071e6101a52a1ccf13b0c5d429c1f3568a Mon Sep 17 00:00:00 2001 From: Yen-Ming Lee Date: Thu, 23 Jan 2003 02:13:39 +0000 Subject: update to linuxigd-0.92, add WWW: in pkg-pdesc --- net/linuxigd/Makefile | 7 ++---- net/linuxigd/distinfo | 2 +- net/linuxigd/files/patch-pmlist.cpp | 49 ++++++++++++++++++------------------- net/linuxigd/pkg-descr | 2 ++ 4 files changed, 29 insertions(+), 31 deletions(-) (limited to 'net/linuxigd') diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile index 251cee297758..347056f0d8f1 100644 --- a/net/linuxigd/Makefile +++ b/net/linuxigd/Makefile @@ -6,11 +6,10 @@ # PORTNAME= linuxigd -PORTVERSION= 0.75 +PORTVERSION= 0.92 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= linux-igd -DISTNAME= gateway-${PORTVERSION} EXTRACT_SUFX= .tgz MAINTAINER= leeym@FreeBSD.org @@ -19,11 +18,9 @@ LIB_DEPENDS= upnp.1:${PORTSDIR}/devel/upnp USE_GMAKE= yes USE_REINPLACE= yes +WRKSRC= ${WRKDIR}/linux-igd MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS} -post-extract: - @${CHMOD} 755 ${WRKSRC}/etc - post-patch: @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/gateway.h diff --git a/net/linuxigd/distinfo b/net/linuxigd/distinfo index acd653f07189..53cbf6cef27f 100644 --- a/net/linuxigd/distinfo +++ b/net/linuxigd/distinfo @@ -1 +1 @@ -MD5 (gateway-0.75.tgz) = d2d69493fb0ccfaf02f278a065623d48 +MD5 (linuxigd-0.92.tgz) = dcda2e1daf524927b1be91f06bc6a3af diff --git a/net/linuxigd/files/patch-pmlist.cpp b/net/linuxigd/files/patch-pmlist.cpp index b0301c18f168..dadae9fe5bfd 100644 --- a/net/linuxigd/files/patch-pmlist.cpp +++ b/net/linuxigd/files/patch-pmlist.cpp @@ -1,45 +1,44 @@ ---- pmlist.cpp.orig Fri May 3 00:16:28 2002 -+++ pmlist.cpp Sat Aug 3 22:11:41 2002 -@@ -30,6 +30,9 @@ - #include +--- pmlist.cpp.orig Fri Jan 3 03:14:24 2003 ++++ pmlist.cpp Mon Jan 20 20:38:16 2003 +@@ -31,6 +31,8 @@ #include - #include -+ + #include + +extern char *ExtIf; + PortMapList::PortMapList() { -@@ -190,9 +193,12 @@ - else - strcpy (prt, "udp"); +@@ -182,8 +184,13 @@ + { + char command[255]; -- sprintf(command,"/usr/sbin/iptables -t nat -A PREROUTING -p %s -d %s --dport %d -j DNAT --to %s:%d", prt, ExtIP, ExtPort, IntIP, IntPort); -- +- sprintf(command,"/usr/sbin/iptables -t nat -A PREROUTING -p %s -d %s --dport %d -j DNAT --to %s:%d", Proto, ExtIP, ExtPort, IntIP, IntPort); - system(command); + FILE *ipnat = popen("/sbin/ipnat -f -", "w"); + if (ipnat == NULL) + return 0; -+ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ExtIf, ExtIP, ExtPort, IntIP, IntPort, prt); ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ++ ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); + pclose(ipnat); - ret=1; - return (ret); -@@ -234,9 +240,13 @@ - else - strcpy (prt, "udp"); - -- sprintf(command, "/usr/sbin/iptables -t nat -D PREROUTING -p %s -d %s --dport %d -j DNAT --to %s:%d", prt, ExtIP, ExtPort, IntIP, IntPort); -- -- system(command); + return (1); + } +@@ -218,9 +225,14 @@ + { + char command[255]; + + FILE *ipnat = popen("/sbin/ipnat -rf -", "w"); + if (ipnat == NULL) + return 0; -+ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ExtIf, ExtIP, ExtPort, IntIP, IntPort, prt); ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ++ ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); + pclose(ipnat); -+ - ret = 1; - return (ret); +- sprintf(command, "/usr/sbin/iptables -t nat -D PREROUTING -p %s -d %s --dport %d -j DNAT --to %s:%d", Proto, ExtIP, ExtPort, IntIP, IntPort); +- system(command); + return (1); + } + diff --git a/net/linuxigd/pkg-descr b/net/linuxigd/pkg-descr index 6c4a8fb9bfae..1337c039efef 100644 --- a/net/linuxigd/pkg-descr +++ b/net/linuxigd/pkg-descr @@ -2,3 +2,5 @@ This project is a deamon that emulates Microsoft's Internet Connection Service (ICS). It implements the UPnP Internet Gateway Device specification (IGD) and allows UPnP aware clients, such as MSN Messenger to work properly from behind a NAT firewall. + +WWW: http://linux-igd.sourceforge.net/ -- cgit v1.2.3