Skip to content
Snippets Groups Projects
Commit 83de608a authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Merge branch 'hruska-bugfix-#7501-ipv6' into devel

parents 6c3fe357 f4b3beee
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ LIST_STAT_GROUPS = (
"""List of statistical groups. The statistics will be calculated separatelly for these."""
LIST_AGGREGATIONS = (
[ST_SKEY_IPS, ('Source.IP4',), KEY_UNKNOWN],
[ST_SKEY_IPS, ('Source.IP4', 'Source.IP6'), KEY_UNKNOWN],
#[ST_SKEY_IP4S, ('Source.IP4',), KEY_UNKNOWN],
#[ST_SKEY_IP6S, ('Source.IP6',), KEY_UNKNOWN],
[ST_SKEY_ANALYZERS, ('Node[#].SW',), KEY_UNKNOWN],
......@@ -820,9 +820,9 @@ def _include_event_to_stats(stats, event, recurring = False, skip = None):
if skip and rule[0] in skip:
continue
values = []
for jpath in rule[1]:
values = jpath_values(event, jpath)
if values: break
values = values + jpath_values(event, jpath)
reg[rule[0]] = values
if not values:
......
......@@ -397,7 +397,8 @@ class TestMentatStatsIdea(unittest.TestCase):
'192.168.0.2-192.168.0.5': 3,
'192.168.0.200': 1,
'192.172.0.109': 1,
'192.172.0.200': 1
'192.172.0.200': 1,
'2001:db8::ff00:42:0/112': 3
},
'list_ids': ['msg01', 'msg02', 'msg03', 'msg04', 'msg05', 'msg06'],
'severities': {'__unknown__': 6}
......@@ -427,7 +428,7 @@ class TestMentatStatsIdea(unittest.TestCase):
'detectorsws': {'__REST__': 3,
'cz.cesnet.holly/Beekeeper': 1,
'org.example.kippo/Kippo': 2},
'ips': {'192.168.0.0/25': 3, '192.168.0.2-192.168.0.5': 3, '__REST__': 6},
'ips': {'192.168.0.0/25': 3, '192.168.0.2-192.168.0.5': 3, '__REST__': 9},
'severities': {'__unknown__': 6}
}
)
......@@ -455,7 +456,7 @@ class TestMentatStatsIdea(unittest.TestCase):
'org.example.dionaea/Kippo': 1,
'org.example.kippo/Kippo': 2,
'org.example.labrea/LaBrea': 1},
'ips': {'192.168.0.0/25': 3, '__REST__': 9},
'ips': {'192.168.0.0/25': 3, '__REST__': 12},
'severities': {'__unknown__': 6}
}
)
......@@ -696,7 +697,8 @@ class TestMentatStatsIdea(unittest.TestCase):
'192.168.0.2-192.168.0.5': 9,
'192.168.0.200': 3,
'192.172.0.109': 3,
'192.172.0.200': 3},
'192.172.0.200': 3,
'2001:db8::ff00:42:0/112': 9},
'severities': {'__unknown__': 18}
}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment