From: Michael Tremer Date: Fri, 13 Mar 2026 11:48:09 +0000 (+0000) Subject: exporters: Configure allocated SIDs X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7890b8a8e2b020e20065ea2ecae40c1b786b766e;p=dbl.git exporters: Configure allocated SIDs https://github.com/sidallocation/sidallocation.org/issues/37 https://github.com/sidallocation/sidallocation.org/commit/0e1c905f5e8eb8cc0d68aa91cc03783077c44efa Signed-off-by: Michael Tremer --- diff --git a/src/dbl/exporters.py b/src/dbl/exporters.py index c5f7bb4..84e5bcb 100644 --- a/src/dbl/exporters.py +++ b/src/dbl/exporters.py @@ -430,11 +430,11 @@ class SuricataRulesExporter(TextExporter): # Write the header self.write_header(f) - # Our SID range is 406000000 - 406999999, because of HTTP Status 406 - Not Acceptable - sid = 406000000 + # Our SID range is 12000000 - 12999999, because of HTTP Status 406 - Not Acceptable + sid = 12000000 - # Shift the ID of the list to the higher 16 bits and append the offset - sid |= self.list.id << 16 + # Shift the ID of the list + sid += self.list.id * 100 # Map the priority # High Priority @@ -464,7 +464,7 @@ class SuricataRulesExporter(TextExporter): ), "classtype" : "policy-violation", "priority" : priority, - "sid" : sid | 1, + "sid" : sid + 1, "rev" : "1", "reference" : ( "url", @@ -488,7 +488,7 @@ class SuricataRulesExporter(TextExporter): ), "classtype" : "policy-violation", "priority" : priority, - "sid" : sid | 2, + "sid" : sid + 2, "rev" : "1", "reference" : ( "url", @@ -512,7 +512,7 @@ class SuricataRulesExporter(TextExporter): ), "classtype" : "policy-violation", "priority" : priority, - "sid" : sid | 3, + "sid" : sid + 3, "rev" : "1", "reference" : ( "url", @@ -536,7 +536,7 @@ class SuricataRulesExporter(TextExporter): ), "classtype" : "policy-violation", "priority" : priority, - "sid" : sid | 4, + "sid" : sid + 4, "rev" : "1", "reference" : ( "url",