summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-08-16 13:36:09 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-08-16 13:36:09 -0400
commit2f90ab8ca65fff3ab5f64ae8da8eb3cd92eb0a4c (patch)
tree672fd7f92650bc527c48047cac9106ab37201d76 /etc/inc
parent44b27984bf8bc5caa29e19f7a4c4c3fd3846b10a (diff)
downloadpfsense-2f90ab8ca65fff3ab5f64ae8da8eb3cd92eb0a4c.zip
pfsense-2f90ab8ca65fff3ab5f64ae8da8eb3cd92eb0a4c.tar.gz
When a UDP reflection line was added for inetd, it was added as stream
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 33e7f90..3953825 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1203,15 +1203,18 @@ function filter_nat_rules_generate() {
$toadd_array[] = $loc_pt_translated;
}
foreach($toadd_array as $tda){
- if($protocol == "udp")
+ if($protocol == "udp") {
+ $socktype = "dgram";
$dash_u = "-u ";
- else
+ } else {
+ $socktype = "stream";
$dash_u = "";
+ }
if($config['system']['reflectiontimeout'])
$reflectiontimeout = $config['system']['reflectiontimeout'];
else
$reflectiontimeout = "2000";
- fwrite($inetd_fd, "{$starting_localhost_port}\tstream\t{$protocol}\tnowait/0\tnobody\t/usr/bin/nc nc {$dash_u}-w {$reflectiontimeout} {$target} {$tda}\n");
+ fwrite($inetd_fd, "{$starting_localhost_port}\t{$socktype}\t{$protocol}\tnowait/0\tnobody\t/usr/bin/nc nc {$dash_u}-w {$reflectiontimeout} {$target} {$tda}\n");
if($ifname_real)
$natrules .= "rdr on \${$ifname_real} proto {$protocol} from any to {$extaddr} port { {$xxx} } -> 127.0.0.1 port {$starting_localhost_port}\n";
$xxx++;
OpenPOWER on IntegriCloud