From 9e053268355f16b9aba6a551febc1e8902cf20c9 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Mon, 13 Nov 2023 18:36:04 +0000 Subject: T5729: T5590: T5616: backport to sagita fwall marks, fix on firewall logs parsing, and migration to valueless node for log and state matchers --- .../include/firewall/common-rule-inet.xml.i | 124 +-------------------- .../include/firewall/firewall-mark.xml.i | 26 +++++ interface-definitions/include/firewall/log.xml.i | 16 +-- interface-definitions/include/firewall/state.xml.i | 30 +++++ interface-definitions/include/nat-rule.xml.i | 7 +- .../include/policy/route-common.xml.i | 105 +---------------- .../include/version/firewall-version.xml.i | 2 +- .../include/version/policy-version.xml.i | 2 +- 8 files changed, 69 insertions(+), 243 deletions(-) create mode 100644 interface-definitions/include/firewall/firewall-mark.xml.i create mode 100644 interface-definitions/include/firewall/state.xml.i (limited to 'interface-definitions/include') diff --git a/interface-definitions/include/firewall/common-rule-inet.xml.i b/interface-definitions/include/firewall/common-rule-inet.xml.i index 88c055f52..52721ecc4 100644 --- a/interface-definitions/include/firewall/common-rule-inet.xml.i +++ b/interface-definitions/include/firewall/common-rule-inet.xml.i @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -81,44 +82,7 @@ - - - Option to log packets matching rule - - enable disable - - - enable - Enable log - - - disable - Disable log - - - (enable|disable) - - - - - - Option to log packets matching rule - - enable disable - - - enable - Enable log - - - disable - Disable log - - - (enable|disable) - - - +#include #include @@ -220,89 +184,7 @@ - - - Session state - - - - - Established state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - Invalid state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - New state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - Related state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - +#include #include diff --git a/interface-definitions/include/firewall/firewall-mark.xml.i b/interface-definitions/include/firewall/firewall-mark.xml.i new file mode 100644 index 000000000..a4cee12d8 --- /dev/null +++ b/interface-definitions/include/firewall/firewall-mark.xml.i @@ -0,0 +1,26 @@ + + + + Firewall mark + + u32:0-2147483647 + Firewall mark to match + + + !u32:0-2147483647 + Inverted Firewall mark to match + + + <start-end> + Firewall mark range to match + + + !<start-end> + Firewall mark inverted range to match + + + + + + + diff --git a/interface-definitions/include/firewall/log.xml.i b/interface-definitions/include/firewall/log.xml.i index 46d20c1df..8f3fae1be 100644 --- a/interface-definitions/include/firewall/log.xml.i +++ b/interface-definitions/include/firewall/log.xml.i @@ -1,15 +1,7 @@ - + - Option to log packets + Enable log + - - - - Enable logging - - - - - - + \ No newline at end of file diff --git a/interface-definitions/include/firewall/state.xml.i b/interface-definitions/include/firewall/state.xml.i new file mode 100644 index 000000000..47ce3c91d --- /dev/null +++ b/interface-definitions/include/firewall/state.xml.i @@ -0,0 +1,30 @@ + + + + Session state + + established invalid new related + + + established + Established state + + + invalid + Invalid state + + + new + New state + + + related + Related state + + + (established|invalid|new|related) + + + + + \ No newline at end of file diff --git a/interface-definitions/include/nat-rule.xml.i b/interface-definitions/include/nat-rule.xml.i index 6234e6195..deb13529d 100644 --- a/interface-definitions/include/nat-rule.xml.i +++ b/interface-definitions/include/nat-rule.xml.i @@ -34,12 +34,7 @@ #include - - - NAT rule logging - - - + #include Packet type diff --git a/interface-definitions/include/policy/route-common.xml.i b/interface-definitions/include/policy/route-common.xml.i index 216ec9bea..e68c18eef 100644 --- a/interface-definitions/include/policy/route-common.xml.i +++ b/interface-definitions/include/policy/route-common.xml.i @@ -1,6 +1,7 @@ #include #include +#include Option to disable firewall rule @@ -76,25 +77,7 @@ - - - Option to log packets matching rule - - enable disable - - - enable - Enable log - - - disable - Disable log - - - (enable|disable) - - - +#include Protocol to match (protocol name, number, or "all") @@ -230,89 +213,7 @@ - - - Session state - - - - - Established state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - Invalid state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - New state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - - Related state - - enable disable - - - enable - Enable - - - disable - Disable - - - (enable|disable) - - - - - +#include #include diff --git a/interface-definitions/include/version/firewall-version.xml.i b/interface-definitions/include/version/firewall-version.xml.i index 39f0cdcba..299eebb00 100644 --- a/interface-definitions/include/version/firewall-version.xml.i +++ b/interface-definitions/include/version/firewall-version.xml.i @@ -1,3 +1,3 @@ - + diff --git a/interface-definitions/include/version/policy-version.xml.i b/interface-definitions/include/version/policy-version.xml.i index 2c96e0f15..4fbe757f5 100644 --- a/interface-definitions/include/version/policy-version.xml.i +++ b/interface-definitions/include/version/policy-version.xml.i @@ -1,3 +1,3 @@ - + -- cgit v1.2.3