sandbox/drawings/cisco_ftd/frd_rules_any_any.puml
2025-01-24 10:50:14 +03:00

73 lines
No EOL
2.8 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@startuml
Title Алгоритм поиска any-any правил Cisco FTD
!define DN <font color=green>destination_network</font>
!define SN <font color=blue>source_network</font>
!define ACTION <font color=red>action</font>
!define NOT_VALID #pink:Правило <b>не</b> не является any-any правилом;
!define VALID #palegreen:Правило является any-any правилом;
!define ANY_CHECK :Проверить, является ли объект предустановленным any4 или any6 объектом;
start
:Получаем правило Cisco FTD;
:Смотрим на такие поля как:
- SN
- DN
- ACTION;
if ((ACTION == "Allow") (ACTION =="Fast-path") = 1?) then (Да)
if ((SN пустое) ∧ (DN пустое) = 1?) then (Да)
:Значит у SN и DN
стоят значение any;
VALID
end
else (Нет)
:Надо проверить, есть ли в списке\nобъектов SN и DN\nпредуставноеленные any4 и any6 объекты;
fork
:Берем SN;
if(SN пустое?) then (Да)
:SN является any;
stop
else (Нет)
:Итерируемся по списку объектов SN;
while(В списке остались объекты?) is (Да)
if (Объект является any объектом?) then (Да)
:SN является any;
stop
else (Нет)
:Взять следующий объект из списка;
endif
endwhile (Нет)
:SN не является any;
stop
endif
fork again
:Берем DN;
if(DN пустое?) then (Да)
:DN является any;
stop
else (Нет)
:Итерируемся по списку объектов DN;
while(В списке остались объекты?) is (Да)
if (Объект является any объектом?) then (Да)
:DN является any;
stop
else (Нет)
:Взять следующий объект из списка;
endif
endwhile (Нет)
:DN не является any;
stop
endif
endfork
if ((SN any) ∧ (DN any) = 1?) then (Да)
VALID
end
else (Нет)
NOT_VALID
end
endif
endif
else (Нет)
NOT_VALID;
end
endif