Skip to content

Commit

Permalink
Simplify $EXTERNAL_NET variable declaration to match Snort change
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeeks8 committed Nov 10, 2023
1 parent d2cd4ad commit f40e5cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@
$external_net = "[" . trim($external_net) . "]";
}
else {
$external_net = "[";
foreach ($home_net_list as $ip)
$external_net .= "!{$ip}, ";
$external_net = trim($external_net, ', ') . "]";
$external_net = "[!\$HOME_NET]";
}

// Set the PASS LIST and write its contents to disk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
elseif ($type == "externalnet") {
if ($wlist == "default") {
$list = suricata_build_list($a_rule, $a_rule['homelistname']);
$contents = "";
$contents = "Defined in suricata.yaml as: !\$HOME_NET which expands to:\n\n";
foreach ($list as $ip)
$contents .= "!{$ip}\n";
$contents = trim($contents, "\n");
Expand Down

0 comments on commit f40e5cb

Please sign in to comment.