Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1595546
 поиск   регистрация   авторизация 
 
Группа :: Безопасность/Сети
Пакет: fiaif

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: fiaif-1.20.1-alt-CBQ-legacy_support.patch


Legacy support for TC_TYPE
--- ./src/zone_rules.awk	2006-02-01 16:31:16 +0300
+++ ./src/zone_rules.awk	2006-02-01 16:09:54 +0300
@@ -72,6 +72,7 @@
     PATTERN["limit_rate"]        = "(second|minute|hour|day)"
     PATTERN["limit"]             = "#integer#/(#limit_rate#)"
     PATTERN["burst"]             = "#integer#"
+    PATTERN["tc_type"]           = "(HTB|CBQ)"
 
     # Rules:
     RULE["PROTO_IP"]             = "(proto_tcp_udp space port_list | proto_icmp space icmp_type | protocol) space src_ip to dst_ip"
@@ -99,6 +100,7 @@
     RULE["SNAT"]                 = "(zone | ip) space <PROTO_IP>"
     RULE["LIMIT"]                = "zone space policy space limit space burst space <PROTO_IP>"
     RULE["TC_ENABLE"]            = "integer"
+    RULE["TC_TYPE"]              = "tc_type"
     RULE["TC_DOWNLINK"]          = "integer"
     RULE["TC_UPLINK"]            = "integer"
     RULE["IPSET"]                = "any"
--- ./src/iptables.sh	2005-11-24 23:57:40 +0300
+++ ./src/iptables.sh	2006-02-02 12:23:33 +0300
@@ -447,6 +447,22 @@
 	fi
     fi
 
+    # Warning for obsolete TC_TYPE
+    if [ -n "${TC_TYPE}" ]; then
+        print_err "Warning: Obsolete TC_TYPE directive found in zone ${ZONE}."
+        print_err "FIAIF now support only HTB type of traffic shaping and"
+        print_err "TC_TYPE directive is meanless. Please remove it from zone"
+        print_err "configuration. In future releases of FIAIF this directive"
+        print_err "will rise an error message."
+        if (( TC_ENABLE == 1 )); then
+            if [[ "${TC_TYPE}" == "CBQ" ]]; then
+	        print_err "Additionally, in this zone TC_TYPE is set to CBQ."
+		print_err "There are no CBQ support in this version of FIAIF,"
+		print_err "HTB is used instead it."
+	    fi
+        fi
+    fi
+    
     rm -f ${TMP_FILE}
     return ${AVAILABLE}
 }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005