diff options
-rw-r--r-- | etc/inc/filter.inc | 18 | ||||
-rw-r--r-- | etc/inc/globals.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/guiconfig.inc | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index c62bba5..8b596ee 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -2200,14 +2200,24 @@ function filter_generate_user_rule($rule) { $aline['flags'] = "flags "; if (!empty($rule['tcpflags1'])) { $flags1 = explode(",", $rule['tcpflags1']); - foreach ($flags1 as $flag1) - $aline['flags'] .= strtoupper($flag1[0]); + foreach ($flags1 as $flag1) { + // CWR flag needs special treatment + if($flag1[0] == "c") + $aline['flags'] .= "W"; + else + $aline['flags'] .= strtoupper($flag1[0]); + } } $aline['flags'] .= "/"; if (!empty($rule['tcpflags2'])) { $flags2 = explode(",", $rule['tcpflags2']); - foreach ($flags2 as $flag2) - $aline['flags'] .= strtoupper($flag2[0]); + foreach ($flags2 as $flag2) { + // CWR flag needs special treatment + if($flag1[0] == "c") + $aline['flags'] .= "W"; + else + $aline['flags'] .= strtoupper($flag2[0]); + } } $aline['flags'] .= " "; } else diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 51fbc22..b5c4eee 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -100,7 +100,7 @@ $g = array( $iptos = array("lowdelay", "throughput", "reliability"); /* TCP flags */ -$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg"); +$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg", "ece", "cwr"); if(file_exists("/etc/platform")) { $arch = php_uname("m"); diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 243232b..5959b15 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -219,7 +219,7 @@ $wkports = array( 5900 => "VNC"); /* TCP flags */ -$tcpflags = array("fin", "syn", "rst", "psh", "ack", "urg"); +$tcpflags = array("fin", "syn", "rst", "psh", "ack", "urg", "ece", "cwr"); $specialnets = array("pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients"); |