Репозитории ALT
S: | 1.22.1-alt4 |
5.1: | 1.21.1-alt1 |
4.1: | 1.21.1-alt0.M41.1 |
4.0: | 1.21.1-alt0.M40.1 |
3.0: | 1.19.2-alt2 |
+backports: | 1.20.1-alt0.M30.1 |
Другие репозитории
Upstream: | 1.21.1 |
Группа :: Безопасность/Сети
Пакет: fiaif
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: fiaif-1.22.1-cleanup_rules.patch
Скачать
Скачать
Fix regex to match format of iptables-save from iptables >= 1.4.15
cleanup_rules.awk optimizes the set of rules from iptables-save output.
In iptables < 1.4.15 the lines with these rules contains a trailing space,
in iptables >= 1.4.15 that trailing space is ommited.
--- src/cleanup_rules.awk
+++ src/cleanup_rules.awk
@@ -43,11 +43,11 @@ function scan_rule(string,
chain = substr(string, RSTART, RLENGTH);
spec_start = RLENGTH+2;
- if ( match(string, "-j[ ][a-zA-Z0-9_+]+.*") == 0) {
+ if ( match(string, "-j[ ][a-zA-Z0-9_+]+.*[^ ]") == 0) {
printf("Rule with no target: -A %s %s\n", chain, specification);
return;
}
- target = substr(string, RSTART+3, RLENGTH-4);
+ target = substr(string, RSTART+3, RLENGTH-3);
specification = substr(string, spec_start, length(string) - spec_start - (RLENGTH));
if ( specification == "" && target == "" ) {