From: Arne Fitzenreiter <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, core141, updated. f2d2c69787acc8ad3383d7482a15f0f8857f57ff
Date: Thu, 30 Jan 2020 12:26:04 +0000 [thread overview]
Message-ID: <487fhr3cm6z2yXP@people01.haj.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 6643 bytes --]
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, core141 has been updated
via f2d2c69787acc8ad3383d7482a15f0f8857f57ff (commit)
via c75fd8c8c5638581b180abbd68ce8fc168b3bd1e (commit)
via ccf83df93c8d7fedaaf8283880164ce12dd96bc3 (commit)
via e8adbea97beb1107a48b3f804143e11ebf6228bb (commit)
via 99cadb743af795134733ce2e229e53c3c0e7359b (commit)
via b76118c32ceb03b40945805e42bd7514f7007f1f (commit)
from 83165259b1db395e2bfecef0b584055583b7d99a (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 f2d2c69787acc8ad3383d7482a15f0f8857f57ff
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Jan 30 12:24:24 2020 +0000
dns.cgi: increase timeout to 5s
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit c75fd8c8c5638581b180abbd68ce8fc168b3bd1e
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Jan 30 12:22:37 2020 +0000
convert-dns-settings: add ppp/settings to list of converted files
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit ccf83df93c8d7fedaaf8283880164ce12dd96bc3
Merge: e8adbea97 83165259b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Jan 30 12:20:46 2020 +0000
Merge branch 'core141'
commit e8adbea97beb1107a48b3f804143e11ebf6228bb
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Jan 30 13:13:46 2020 +0100
general-functions.pl: Return unique list of nameservers
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit 99cadb743af795134733ce2e229e53c3c0e7359b
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Jan 30 13:07:01 2020 +0100
ids-functions.pl: Fall back to $EXTERNAL_NET for DNS servers
When no DNS servers are configured (aka recursor mode), the
DNS servers that unbound will try to contact can be anywhere.
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
commit b76118c32ceb03b40945805e42bd7514f7007f1f
Author: Arne Fitzenreiter <arne_f(a)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(a)ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/cfgroot/general-functions.pl | 5 ++++-
config/cfgroot/ids-functions.pl | 25 ++++---------------------
html/cgi-bin/dns.cgi | 2 +-
src/scripts/convert-dns-settings | 1 +
4 files changed, 10 insertions(+), 23 deletions(-)
Difference in files:
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index 448f4c635..41a0eac2d 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -29,6 +29,9 @@ $General::adminmanualurl = 'http://wiki.ipfire.org';
require "${General::swroot}/network-functions.pl";
+# Function to remove duplicates from an array
+sub uniq { my %seen; grep !$seen{$_}++, @_ }
+
#
# log ("message") use default 'ipcop' tag
# log ("tag","message") use your tag
@@ -1255,7 +1258,7 @@ sub get_nameservers () {
}
# Return the array.
- return @nameservers;
+ return &uniq(@nameservers);
}
1;
diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl
index 3cfe837db..af8a927e0 100644
--- a/config/cfgroot/ids-functions.pl
+++ b/config/cfgroot/ids-functions.pl
@@ -712,32 +712,15 @@ 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 = "\$EXTERNAL_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 +732,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);
diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi
index 3b47f5ed4..4f3418a70 100755
--- a/html/cgi-bin/dns.cgi
+++ b/html/cgi-bin/dns.cgi
@@ -434,7 +434,7 @@ sub show_nameservers () {
#
# Simple send a request to unbound and check if it can resolve the
# DNS test server.
- my $dns_status_ret = &check_nameserver("127.0.0.1", "$dns_test_server", "UDP", undef, "+timeout=1", "+retry=0");
+ my $dns_status_ret = &check_nameserver("127.0.0.1", "$dns_test_server", "UDP", undef, "+timeout=5", "+retry=0");
if ($dns_status_ret eq "2") {
$dns_status_string = "$Lang::tr{'working'}";
diff --git a/src/scripts/convert-dns-settings b/src/scripts/convert-dns-settings
index 11efc7cba..945a15ef0 100755
--- a/src/scripts/convert-dns-settings
+++ b/src/scripts/convert-dns-settings
@@ -22,6 +22,7 @@
FILES=(
/var/ipfire/ethernet/settings
/var/ipfire/dns/settings
+ /var/ipfire/ppp/settings
/var/ipfire/ppp/settings-*
)
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2020-01-30 12:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=487fhr3cm6z2yXP@people01.haj.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox