aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-02-13 08:57:46 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-02-13 09:04:07 +0200
commitde8778ee1a6139cc1c117c06058d7004cae01d50 (patch)
tree0e5dfd3ab14b0b657e9e5992927f82f1aa439130
parent1d1687c574bcbf5a7f54cb45763ad36fa70b3c2a (diff)
downloadping903-de8778ee1a6139cc1c117c06058d7004cae01d50.tar.gz
ping903-de8778ee1a6139cc1c117c06058d7004cae01d50.tar.bz2
Change default listen address to 127.0.0.1
-rw-r--r--doc/ping903.89
-rw-r--r--doc/ping903.conf.59
-rw-r--r--src/defs.h2
-rw-r--r--src/ping903.c10
-rw-r--r--src/ping903q.c2
5 files changed, 14 insertions, 18 deletions
diff --git a/doc/ping903.8 b/doc/ping903.8
index bf76d16..b18bd54 100644
--- a/doc/ping903.8
+++ b/doc/ping903.8
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>.
-.TH PING903 8 "February 12, 2020" "PING903" "System Administration"
+.TH PING903 8 "February 13, 2020" "PING903" "System Administration"
.SH NAME
ping903 \- high-performance ICMP monitoring daemon
.SH SYNOPSIS
@@ -69,10 +69,9 @@ failure \fItolerance\fR number) are lost, the status of the IP is
changed to "inactive".
.PP
The \fBHTTP\fR listener is provided for returning the collected
-statistics. By default the program listens for queries on port 8080
-on all available interfaces. If compiled with the support for
-\fBlibwrap\fR, the access to the HTTP interface can be controlled
-using files
+statistics. By default the program listens for queries on localhost,
+port 8080. If compiled with the support for \fBlibwrap\fR, the access
+to the HTTP interface can be controlled using files
.B /etc/hosts.allow
and
.BR /etc/hosts.deny .
diff --git a/doc/ping903.conf.5 b/doc/ping903.conf.5
index 25321d9..c6bcb69 100644
--- a/doc/ping903.conf.5
+++ b/doc/ping903.conf.5
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>.
-.TH PING903.CONF 5 "February 12, 2020" "PING903.CONF" "File Formats Manual"
+.TH PING903.CONF 5 "February 13, 2020" "PING903.CONF" "File Formats Manual"
.SH NAME
ping903.conf \- configuration file for high-performance ICMP monitoring daemon
.SH DESCRIPTION
@@ -98,10 +98,9 @@ is the port number of
symbolic service name from
.BR /etc/services .
Either \fIIPADDR\fR or \fIPORT\fR (but not both) can be omitted. Missing
-\fIIPADDR\fR is equivalent to 0.0.0.0 and means "listen on all
-available interfaces" (note, that in this case the colon before
-\fIPORT\fR must be present). Missing \fIPORT\fR means use the default
-port number (8080).
+\fIIPADDR\fR is equivalent to 127.0.0.1 (note, that in this case the
+colon before \fIPORT\fR must be present). Missing \fIPORT\fR means
+use the default port number (8080).
To summarize, possible arguments are:
\fIIPADDR\fB:\fIPORT\fR, \fIIPADDR\fR, or \fB:\fIPORT\fR.
diff --git a/src/defs.h b/src/defs.h
index 25143d7..d41c9a8 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -1,7 +1,7 @@
#include <stdarg.h>
#ifndef DEFAULT_ADDRESS
-# define DEFAULT_ADDRESS "0.0.0.0"
+# define DEFAULT_ADDRESS "127.0.0.1"
#endif
#ifndef DEFAULT_SERVICE
# define DEFAULT_SERVICE "8080"
diff --git a/src/ping903.c b/src/ping903.c
index cdf0752..02b4228 100644
--- a/src/ping903.c
+++ b/src/ping903.c
@@ -386,20 +386,18 @@ ping903(void)
p903_httpd_acl, server_addr,
p903_httpd_handler, NULL,
MHD_OPTION_LISTEN_SOCKET, fd,
-#if 0
- MHD_OPTION_NOTIFY_COMPLETED, p903_httpd_request_completed, NULL,
-#endif
MHD_OPTION_EXTERNAL_LOGGER, p903_httpd_logger, NULL,
MHD_OPTION_END);
+
/* Unblock only the fatal signals */
-
sigdelset(&sigs, SIGPIPE);
pthread_sigmask(SIG_UNBLOCK, &sigs, NULL);
+ /* Start the Scheduler thread */
pthread_create(&tid, NULL, p903_scheduler, NULL);
- /* Start Sender thread */
+ /* Start the Sender thread */
pthread_create(&tid, NULL, p903_sender, NULL);
- /* Start Receiver thread */
+ /* Start the Receiver thread */
pthread_create(&tid, NULL, p903_receiver, NULL);
/* Wait for signal to arrive */
diff --git a/src/ping903q.c b/src/ping903q.c
index f9cd5fa..e709f64 100644
--- a/src/ping903q.c
+++ b/src/ping903q.c
@@ -600,7 +600,7 @@ main(int argc, char **argv)
p = node = read_listen(&service);
if (!node || !node[0])
- node = "127.0.0.1";
+ node = DEFAULT_ADDRESS;
if (!service)
service = DEFAULT_SERVICE;
http_connect(node, service);

Return to:

Send suggestions and report system problems to the System administrator.