summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
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