summaryrefslogtreecommitdiff
path: root/net/linuxigd/files/patch-pmlist.cpp
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2004-06-11 04:35:35 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2004-06-11 04:35:35 +0000
commit0c1b0ad8a2feddb30dc6df86c8b80f90df225602 (patch)
treebd238f334ac74d45139ab7b3335bb29f7195a62a /net/linuxigd/files/patch-pmlist.cpp
parent- use INFO (diff)
- 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/files/patch-pmlist.cpp')
-rw-r--r--net/linuxigd/files/patch-pmlist.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/net/linuxigd/files/patch-pmlist.cpp b/net/linuxigd/files/patch-pmlist.cpp
index dadae9fe5bfd..efaef03590ee 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);
}
-