diff options
author | leeym <leeym@FreeBSD.org> | 2004-06-11 12:35:35 +0800 |
---|---|---|
committer | leeym <leeym@FreeBSD.org> | 2004-06-11 12:35:35 +0800 |
commit | c896f9c3c887b0200a79de68dd24724264b076e6 (patch) | |
tree | f156cfd32757cce5933fd2aa4eef035c0dc71b2d /net/linuxigd | |
parent | 96a1576a7d458e59bc3f7d8418704cede462315a (diff) | |
download | freebsd-ports-graphics-c896f9c3c887b0200a79de68dd24724264b076e6.tar.gz freebsd-ports-graphics-c896f9c3c887b0200a79de68dd24724264b076e6.tar.zst freebsd-ports-graphics-c896f9c3c887b0200a79de68dd24724264b076e6.zip |
- redirect localhost to internal interface when redirect requests occur. [1]
- some cosmetic fixes
- bump PORTREVISION
PR: [1] 67780
Submitted by: [1] Kensaku MASUDA <greg@greg.jp>
Diffstat (limited to 'net/linuxigd')
-rw-r--r-- | net/linuxigd/Makefile | 2 | ||||
-rw-r--r-- | net/linuxigd/files/patch-Makefile | 7 | ||||
-rw-r--r-- | net/linuxigd/files/patch-pmlist.cpp | 19 |
3 files changed, 16 insertions, 12 deletions
diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile index c2ed957f94e..c19e5405a83 100644 --- a/net/linuxigd/Makefile +++ b/net/linuxigd/Makefile @@ -7,7 +7,7 @@ PORTNAME= linuxigd PORTVERSION= 0.92 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= linux-igd diff --git a/net/linuxigd/files/patch-Makefile b/net/linuxigd/files/patch-Makefile index d2297bebb07..690e1ae903b 100644 --- a/net/linuxigd/files/patch-Makefile +++ b/net/linuxigd/files/patch-Makefile @@ -4,12 +4,12 @@ CC=g++ -INCLUDES= -I/usr/include/upnp -LIBS= -lpthread /usr/lib/libupnp.so -+INCLUDES= -I$(PREFIX)/include -+LIBS= $(PTHREAD_LIBS) $(PREFIX)/lib/libupnp.so ++INCLUDES= -I$(LOCALBASE)/include ++LIBS= $(PTHREAD_LIBS) $(LOCALBASE)/lib/libupnp.so ifeq ($(DEBUG),1) -@@ -26,7 +26,7 @@ +@@ -26,6 +26,6 @@ rm -f *.o $(APPS) install: upnpd @@ -19,4 +19,3 @@ + @install -d $(PREFIX)/etc/linuxigd + @$(BSD_INSTALL_DATA) etc/* $(PREFIX)/etc/linuxigd + @$(BSD_INSTALL_PROGRAM) upnpd $(PREFIX)/bin - diff --git a/net/linuxigd/files/patch-pmlist.cpp b/net/linuxigd/files/patch-pmlist.cpp index dadae9fe5bf..efaef03590e 100644 --- a/net/linuxigd/files/patch-pmlist.cpp +++ b/net/linuxigd/files/patch-pmlist.cpp @@ -1,5 +1,5 @@ ---- pmlist.cpp.orig Fri Jan 3 03:14:24 2003 -+++ pmlist.cpp Mon Jan 20 20:38:16 2003 +--- pmlist.cpp.orig Fri Jan 3 04:14:24 2003 ++++ pmlist.cpp Wed May 26 10:37:36 2004 @@ -31,6 +31,8 @@ #include <unistd.h> #include <iostream> @@ -9,7 +9,7 @@ PortMapList::PortMapList() { -@@ -182,8 +184,13 @@ +@@ -182,8 +184,16 @@ { char command[255]; @@ -18,27 +18,32 @@ + FILE *ipnat = popen("/sbin/ipnat -f -", "w"); + if (ipnat == NULL) + return 0; -+ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s\n", + ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); ++ sprintf(command, "rdr lo0 %s/32 port %d -> %s port %d %s\n", ++ ExtIP, ExtPort, IntIP, IntPort, Proto); ++ fprintf(ipnat, command); + pclose(ipnat); return (1); } -@@ -218,9 +225,14 @@ +@@ -218,8 +228,16 @@ { 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", ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s\n", + ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); ++ sprintf(command, "rdr lo0 %s/32 port %d -> %s port %d %s\n", ++ ExtIP, ExtPort, IntIP, IntPort, Proto); ++ fprintf(ipnat, command); + pclose(ipnat); - 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); } - |