This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, master has been updated via b76118c32ceb03b40945805e42bd7514f7007f1f (commit) from e2338aa7ef6936044b6782fdbdd6abc12738395c (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit b76118c32ceb03b40945805e42bd7514f7007f1f Author: Arne Fitzenreiter arne_f@ipfire.org Date: Thu Jan 30 12:51:31 2020 +0100
ids-functions.pl: Fix generating DNS_SERVERS
The configuration file has an invalid syntax which causes suricata to fail to start.
There was no comma inserted between DNS servers when there was more than two of them. This is now fixed in this patch..
Signed-off-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/cfgroot/ids-functions.pl | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)
Difference in files: diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 3cfe837db..186c39ac7 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -712,32 +712,18 @@ sub generate_dns_servers_file() { my @nameservers = &General::get_nameservers();
# Format dns servers declaration. - my $line = ""["; + my $line = "";
# Check if the system has configured nameservers. if (@nameservers) { - # Loop through the array of nameservers. - foreach my $server (@nameservers) { - # Add the DNS server to the line. - $line = "$line" . "$server"; - - # Check if the current DNS server was the last in the array. - if ($server ne $nameservers[-1]) { - # Add "," for the next DNS server. - $line = "$line" . ","; - } - } + $line = join(",", @nameservers); } else { # The responsible DNS servers on red are directly used, and because we are not able # to specify each single DNS server address here, we currently have to thread each # address which is not part of the HOME_NET as possible DNS server. - $line = "$line" . "!$HOME_NET"; - + $line = "!$HOME_NET"; }
- # Close the line... - $line = "$line" . "]""; - # Open file to store the used DNS server addresses. open(FILE, ">$dns_servers_file") or die "Could not open $dns_servers_file. $!\n";
@@ -749,7 +735,7 @@ sub generate_dns_servers_file() { print FILE "#Autogenerated file. Any custom changes will be overwritten!\n";
# Print the generated DNS declaration to the file. - print FILE "DNS_SERVERS:\t$line\n"; + print FILE "DNS_SERVERS:\t"[$line]"\n";
# Close file handle. close(FILE);
hooks/post-receive -- IPFire 2.x development tree