Skip to content

Commit

Permalink
MikroTik RouterOs add management of entry without flags in ip-firewal…
Browse files Browse the repository at this point in the history
…l-address-list template
  • Loading branch information
k-ribot committed Mar 21, 2023
1 parent 80740e2 commit 5b48c4b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Value Key INDEX (\d+)
Value FLAGS ([XD ])
Value FLAGS ([XD])
Value LIST (\S+)
Value ADDRESS (\S+)
Value CREATION_TIME (\S+\s\S+)
Value TIMEOUT (\S+)
Value DYNAMIC (yes|no)

Start
^\s*${INDEX}\s${FLAGS}\slist=${LIST}\saddress=${ADDRESS}(\screation-time=${CREATION_TIME})?(\stimeout=${TIMEOUT})?(\sdynamic=${DYNAMIC})?.*$$ -> Record
^\s*${INDEX}\s+(${FLAGS})?\s*list=${LIST}\saddress=${ADDRESS}(\screation-time=${CREATION_TIME})?(\stimeout=${TIMEOUT})?(\sdynamic=${DYNAMIC})?.*$$ -> Record
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
12 list=azeazeaze address=192.168.1.3 creation-time=jun/14/2022 06:44:51
13 X list=azeazeaze address=192.168.3.0/24 creation-time=jun/14/2022 07:53:30
14 D list=azeazeaze address=192.168.3.0/24 creation-time=jun/14/2022 07:53:49 timeout=4m52s
15 list=snmp-monitoring-address-list address=85.14.167.234 creation-time=mar/01/2023 13:59:33
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
---
parsed_sample:
- index: "0"
flags: " "
flags: ""
list: "Eqinoxe"
address: "185.48.253.0/27"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "1"
flags: " "
flags: ""
list: "Eqinoxe"
address: "185.48.254.0/28"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "2"
flags: " "
flags: ""
list: "Eqinoxe"
address: "185.163.212.64/28"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "3"
flags: " "
flags: ""
list: "Eqinoxe"
address: "185.163.212.48/28"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "4"
flags: " "
flags: ""
list: "Eqinoxe"
address: "185.197.109.16/28"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "5"
flags: " "
flags: ""
list: "Supervision"
address: "185.132.66.240"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "6"
flags: " "
flags: ""
list: "Supervision"
address: "85.14.167.232/29"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "7"
flags: " "
flags: ""
list: "Supervision"
address: "185.48.254.16/29"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "8"
flags: " "
flags: ""
list: "Supervision"
address: "5.10.130.152/30"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "9"
flags: " "
flags: ""
list: "Supervision"
address: "85.14.167.193"
creation_time: "jan/01/2002 01:00:25"
timeout: ""
dynamic: ""
- index: "10"
flags: " "
flags: ""
list: "azeazeaze"
address: "192.168.1.1"
creation_time: "jun/14/2022 06:34:30"
timeout: ""
dynamic: ""
- index: "11"
flags: " "
flags: ""
list: "azeazeaze"
address: "192.168.1.2"
creation_time: "jun/14/2022 06:44:09"
timeout: ""
dynamic: ""
- index: "12"
flags: " "
flags: ""
list: "azeazeaze"
address: "192.168.1.3"
creation_time: "jun/14/2022 06:44:51"
Expand All @@ -105,3 +105,10 @@ parsed_sample:
creation_time: "jun/14/2022 07:53:49"
timeout: "4m52s"
dynamic: ""
- index: "15"
flags: ""
list: "snmp-monitoring-address-list"
address: "85.14.167.234"
creation_time: "mar/01/2023 13:59:33"
timeout: ""
dynamic: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
4 D list=azeazeaze address=d4de:e2c0::/26 timeout=7m49s dynamic=yes
5 list=azeazeaze address=e7ba:6ba4:5eb9:4014:37f:d1ab:6d74:ad62/128 dynamic=no
6 X list=azeazeaze address=e7ba:6ba4:5eb9:4014:37f:d1ab:6d74:0/128 dynamic=no
7 list=ertyhgfgf address=e7bb:6ba4:5eb9:4014:37f:d1ab:6d74:0/128 dynamic=no
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
parsed_sample:
- index: "0"
flags: " "
flags: ""
list: "Supervision"
address: "2a05:c100::/48"
creation_time: ""
timeout: ""
dynamic: "no"
- index: "1"
flags: " "
flags: ""
list: "Supervision"
address: "2a00:41e0::/48"
creation_time: ""
timeout: ""
dynamic: "no"
- index: "2"
flags: " "
flags: ""
list: "azeazeaze"
address: "b620::/11"
creation_time: ""
Expand All @@ -36,7 +36,7 @@ parsed_sample:
timeout: "7m49s"
dynamic: "yes"
- index: "5"
flags: " "
flags: ""
list: "azeazeaze"
address: "e7ba:6ba4:5eb9:4014:37f:d1ab:6d74:ad62/128"
creation_time: ""
Expand All @@ -49,3 +49,10 @@ parsed_sample:
creation_time: ""
timeout: ""
dynamic: "no"
- index: "7"
flags: ""
list: "ertyhgfgf"
address: "e7bb:6ba4:5eb9:4014:37f:d1ab:6d74:0/128"
creation_time: ""
timeout: ""
dynamic: "no"

0 comments on commit 5b48c4b

Please sign in to comment.