aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-22 13:50:42 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-22 13:50:42 +0200
commit183f980d6f87706d238e261ab7acd7f0aeaa9b04 (patch)
treefe8ad360eef4fb4ebc7a5783fe0988c3400e414f
parent69de36649685e95882a4dbcc6e6e3949d181d980 (diff)
downloadping903-183f980d6f87706d238e261ab7acd7f0aeaa9b04.tar.gz
ping903-183f980d6f87706d238e261ab7acd7f0aeaa9b04.tar.bz2
Minor fixes. Add org docs.
* doc/ping903.cred.5: Fix copy-paste error. * maint/README.org: New file. * maint/style.css: New file. * src/remoteip.c (str_to_cidr): Fix typo.
-rw-r--r--doc/ping903.cred.54
-rw-r--r--maint/README.org549
-rw-r--r--maint/style.css85
-rw-r--r--src/remoteip.c4
4 files changed, 638 insertions, 4 deletions
diff --git a/doc/ping903.cred.5 b/doc/ping903.cred.5
index b2e187a..ede1b2b 100644
--- a/doc/ping903.cred.5
+++ b/doc/ping903.cred.5
@@ -13,9 +13,9 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>. 15.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>.
16.TH PING903.CRED 5 "February 27, 2020" "PING903.CONF" "File Formats Manual" 16.TH PING903.CRED 5 "March 22, 2020" "PING903.CRED" "File Formats Manual"
17.SH NAME 17.SH NAME
18ping903.conf \- Credentials storage for ping903 18ping903.cred \- Credentials storage for ping903
19.SH DESCRIPTION 19.SH DESCRIPTION
20The file 20The file
21.B .ping903.conf 21.B .ping903.conf
diff --git a/maint/README.org b/maint/README.org
new file mode 100644
index 0000000..4374649
--- /dev/null
+++ b/maint/README.org
@@ -0,0 +1,549 @@
1* Overview
2
3Ping903 is designed to periodically monitor a very large number of
4remote hosts using ICMP ECHO packets. The system is built using the
5client-server architecture. The main component (*ping903*) is a daemon
6that sits in memory and wakes up periodically to send certain number
7of ICMP echo packets to a preconfigured number of hosts and to collect
8replies. The resulting round-trip statistics is made available via
9REST API.
10
11The daemon reads its settings from a plain text configuration file.
12Most settings have sensible defaults, so that the only thing that the
13user needs to supply to get started is a list of IP addresses to
14monitor. This list is referred to in this document as /ip-list/.
15
16A simple command line client utility (*ping903q*) allows the user to
17communicate with the daemon, obtaining the needed information about
18each host in particular, or all monitored hosts at once. This utility
19can operate in several modes. In particular, it can be used as
20Nagios external check tool, instead of the standard *check_ping* utility.
21
22The package and its companion packages are available for download from
23https://download.gnu.org.ua/release/ping903.
24
25For the recent news, visit the package development site at
26https://puszcza.gnu.org.ua/projects/ping903.
27
28The git repository is available at
29http://git.gnu.org.ua/cgit/ping903.git.
30
31
32* Installation
33
34To build *ping903* you will need *GNU Libmicrohttpd library*. It is
35available for download from http://ftp.gnu.org/gnu/libmicrohttpd.
36
37When building from source package, usual incantations apply:
38
39#+BEGIN_SRC shell-script
40 ./configure
41 make
42 make install
43#+END_SRC
44
45This will install the package under */usr/local*. That is, the server
46will be installed as */usr/local/sbin/ping903*, the client program as
47*/usr/local/bin/ping903q*, etc. You can give a number of options to
48*./configure* in order to customize your installation, in particular to
49alter the default installation paths. For example, to install to the
50*/usr* file hierarchy, use
51
52#+BEGIN_SRC shell-script
53 ./configure --prefix=/usr
54#+END_SRC
55
56Please refer to the =INSTALL= document in the source directory for a
57discussion of available options to configure and their effect.
58
59After installing the package, copy the file *src/ping903.conf* to
60*/etc/ping903.conf* and edit it to your liking. This file contains
61configuration settings that control the behavior of the server daemon
62and, to a certain extent, that of a query tool. Short annotations
63before each statement will help you navigate through it. You will
64find a detailed discussion of the configuration file in the manpage
65[[http://man.gnu.org.ua/manpage/?5+ping903.conf][ping903.conf]](5). What follows is a short outline, intended for quick
66start.
67
68At the very beginning you can leave most settings at their default
69values. You might wish to supply a list of IP addresses to monitor,
70although even that is not mandatory, since you can add them later,
71when the program is already running. To specify them in configuration
72file, use the =ip-list= statement. Its argument is either the name
73of a file with the IP addresses, or a list of IP addresses as a
74/here-document/:
75
76#+BEGIN_SRC shell-script
77 ip-list FILENAME
78#+END_SRC
79
80or
81
82#+BEGIN_SRC shell-script
83 ip-list <<EOF
84 ...
85 EOF
86#+END_SRC
87
88(you can use arbitrary word in place of =EOF= in the latter example,
89the only requirement being that the list end with exactly the same
90word as the one that followed =<<= at its beginning).
91
92In either case, IP addresses must be listed one per line of input.
93Leading and trailing whitespace is ignored, as well as empty lines.
94Comments are introduced by a hash sign (#) appearing as the first
95non-whitespace character on a line.
96
97You are not required to keep all your IP addresses in a single file.
98If necessary, you can scatter them among several files and name each
99of them in a separate =ip-list= statement.
100
101IP addresses listed in ip-list files form the /immutable/ IP list,
102called so because it cannot be altered while the program is running.
103The REST API allows the user to add any number of IP addresses at
104runtime as well as remove any of IP addresses added this way. These
105addresses form the /mutable/ IP list. Mutable IP list is preserved
106across program restarts.
107
108This means that actually the immutable IP list is optional. You may
109choose to keep all monitored addresses in an external storage (an SQL
110database, for example) and load them dynamically after the daemon
111has started. A working example program for adding IP addresses from
112a MySQL database is shipped in the [[http://git.gnu.org.ua/cgit/ping903.git/tree/examples][examples]] directory. A full-fledged
113client package able to add or delete keywords at runtime, both
114individually or in batches and providing another features is available
115from <http://git.gnu.org.ua/cgit/ping903/mangemanche.git>.
116
117Normally, the ip-list file should contain IP addresses of the hosts to
118monitor. It is OK, however, to use symbolic DNS names, too. If a
119hostname resolves to a single A record, such usage is equivalent to
120placing that IP in the ip-list. However, if the hostname resolves to
121multiple IPs, only first one will be used.
122
123By default, the server will wake up each minute and send 10 echo
124requests within 1 second intervals to each registered IP. If the
125number of collected replies is less than 7, the IP will be declared as
126dead ("alive": false, in the returned JSON). Otherwise it is
127considered alive ("alive": true).
128
129The following settings control these parameters:
130
131- probe-interval N ::
132 Interval between wake-ups in seconds.
133 Default *N=60*.
134- ping-count N ::
135 Number of ICMP packets to send within each probe.
136 Default *N=10*.
137- ping-interval N ::
138 Interval in seconds between two sequential echo requests.
139 Default *N=1*.
140- tolerance N ::
141 Maximum number of lost requests after which the host is considered
142 dead.
143 Default *N=3*.
144
145Another statement worth your attention is =listen=. It configures the
146IP address and port on which the server will listen for incoming HTTP
147requests. The default is *localhost:8080*. Change this setting if
148this port is already occupied on your system or if you wish to make
149ping903 accessible from outside.
150
151The access to the HTTP interface is protected by the default access
152control library (the files */etc/hosts.allow* and */etc/hosts.deny*).
153Refer to [[http://man.gnu.org.ua/manpage/?3+hosts_access][hosts_access]](3) for details.
154
155When you have finished with the configuration file, run *ping903* to
156start the daemon. Check if there are no errors (on the standard
157error and in the syslog channel *daemon*). To verify if the daemon is
158operational, run
159
160#+BEGIN_SRC shell-script
161 curl http://localhost:8080/config
162#+END_SRC
163
164This should return the running configuration.
165
166Within the next =probe-interval= seconds the server will collect
167enough statistics to answer your queries. You can request information
168about any particular IP from your ip-list by running
169
170#+BEGIN_SRC shell-script
171 ping903q IP
172#+END_SRC
173
174This will return the current status of the IP, e.g.
175
176#+BEGIN_SRC shell-script
177 $ ping903q 203.0.113.1
178 203.0.113.1 is alive
179#+END_SRC
180
181To get the detailed statistics use the *-v* option. The result will be
182formatted in a [[http://man.gnu.org.ua/manpage/?8+ping][ping]](8)-like manner:
183
184#+BEGIN_SRC shell-script
185 $ ping903q -v 203.0.113.1
186 203.0.113.1 is alive
187 --- 203.0.113.1 ping statistics ---
188 10 packets transmitted, 10 received, 0% packet loss, time 9414ms
189 rtt min/avg/max/mdev = 41.212/41.265/41.374/0.046 ms
190#+END_SRC
191
192In both cases, any number of IP addresses can be given. E.g. the
193following command will returns statistics for two IPs:
194
195#+BEGIN_SRC shell-script
196 $ ping903q -v 203.0.113.1 203.0.113.5
197#+END_SRC
198
199To check the current status of all hosts, run
200
201#+BEGIN_SRC shell-script
202 $ ping903q -a
203#+END_SRC
204
205Note, that depending on your settings the output can be huge.
206
207Please refer to [[http://man.gnu.org.ua/manpage/?1+ping903q][ping903q]](1), for a detailed discussion of the tool.
208
209* System start-up sequence
210
211To configure *ping903* to start automatically at the system start-up,
212see the [[http://git.gnu.org.ua/cgit/ping903.git/tree/rc][rc]] subdirectory. It contains start up scripts for various
213flavors of GNU/Linux distributions. Please refer to the *README* file
214in this directory for detailed instructions.
215
216* Nagios external check
217
218The *ping903q* tool can be used as a Nagios external check program. The
219following snippet illustrates the simple Nagios configuration that
220makes use of it:
221
222#+BEGIN_SRC nagios-script
223 # Define the check_ping903 command
224 define command {
225 command_name check_ping903
226 command_line /usr/bin/ping903q -r -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
227 }
228
229 # Define the service using the new command
230 define service {
231 host_name server.example.net
232 address 203.0.113.1
233 service_description Server status
234 check_command check_ping903!200.0,20%!600.0,60%
235 check_interval 5
236 retry_interval 1
237 }
238#+END_SRC
239
240* Installation from a git clone
241
242If you are building from a clone of the Git repository, you will need
243GNU autotools to bootstrap the package first. Run
244
245#+BEGIN_SRC nagios-script
246 ./bootstrap
247#+END_SRC
248
249in the top level source directory. This will create the configure
250script and populate the directory with the missing files. Then proceed
251as described above.
252
253* REST API
254
255The default channel for communication with the *ping903* daemon is the
256HTTP socket open on localhost port 8080. Only GET requests are
257allowed. The following endpoints are provided:
258
259** /id
260
261Identifies the running instance. On success, a JSON object with the
262following attributes is returned:
263
264- "package": string ::
265 The package name.
266- "version": string ::
267 Package version string.
268- "pid": number ::
269 PID of the running instance.
270
271** /id/ATTR
272
273*ATTR* is one of the attributes discussed above. Returned is the value
274of that attribute.
275
276** /host/[NAME]?[select=HOSTLIST][attr=ATTRLIST]
277
278*NAME* is the IP address or hostname and *HOSTLIST* is a comma-separated
279list of such names. If *NAME* is supplied, it is added at the beginning
280of *HOSTLIST* and the hosts in *HOSTLIST* are looked up in the list of
281hosts being monitored. Note that *NAME* is treated as a character
282string and must coincide exactly with the IP or hostname as it was
283supplied in configuration. In particular, if a host was specified by
284its symbolic DNS name in the configuration, exactly that name must be
285used in URL to obtain statistics for that host. If you wish to use
286IP, see the */match* endpoint, discussed below.
287
288The return value is a JSON array whose elements correspond to the
289entries in *HOSTLIST* (after addition of *NAME*, if given). Each element
290is an object with the following attributes:
291
292- "name": string ::
293 The IP or hostname of the host under which it was supplied in the
294 ip-list.
295
296- "validity": boolean ::
297 Status of this record. If false, the data has not been collected yet
298 or the host is unreachable. A more detailed information is available in
299 the "status" member (see below). If "validity" is false, only the
300 following keys are warranted to be present in the object: "name",
301 "validity", "status", and "xmit-timestamp". If it is true, the full
302 statistics is available as described below.
303
304- "status": string ::
305 Detailed status of the object. Following values are defined:
306
307 - "init" ::
308 Initial state: data are being collected ("validity":false).
309 - "valid" ::
310 The object is valid and its statistics is reliable ("validity": true).
311 - "pending" ::
312 The object is valid, it contains reliable statistics. The host
313 is being probed at the moment and the object will be updated
314 soon ("validity": true).
315 - "invalid" ::
316 Host is unreachable. No statistics available ("validity": false).
317
318- "xmit-timestamp": number ::
319
320 Time (the number of seconds since the Epoch) when the last ICMP
321 ECHO request was transmitted.
322
323- "start-timestamp": number ::
324 Time when the recent probe sequence was initiated.
325
326- "stop-timestamp": number ::
327 Time when the recent probe sequence was finished.
328
329- "xmit": number ::
330 Number of ICMP ECHO requests transmitted during the probe.
331
332- "recv": number ::
333 Number of ICMP ECHO responses received during the probe.
334
335- "loss": number ::
336 Percentage of lost packets.
337
338- "tmin": number ::
339 Minimal round-trip time observed during the probe.
340
341- "tmax": number ::
342 Maximal round-trip time observed during the probe.
343
344- "avg": number ::
345 Average round-trip time.
346
347- "stddev": number ::
348 Standard deviation of round-trip times.
349
350- "alive": boolean ::
351 Host status computed as a result of the probe. It is true, if the
352 difference between "xmit" and "recv" parameters is less than the
353 "tolerance" configuration setting, and false otherwise.
354
355Example of the returned JSON for a reachable host:
356
357#+BEGIN_SRC json
358 {
359 "alive":true,
360 "avg":25.85150,
361 "dup":0.00000,
362 "loss":0.00000,
363 "name":"203.0.113.1",
364 "recv":10.00000,
365 "start-timestamp":1581666176.01285,
366 "status":true,
367 "stddev":0.03201,
368 "stop-timestamp":1581666185.27210,
369 "tmax":25.91400,
370 "tmin":25.81200,
371 "xmit":10.00000,
372 "xmit-timestamp":1581666185.24628
373 }
374#+END_SRC
375
376Example of the returned JSON for an unreachable host:
377
378#+BEGIN_SRC json
379 {
380 "name":"203.0.113.2",
381 "status":false,
382 "xmit-timestamp":1581666176.01373
383 }
384#+END_SRC
385
386The "attr" request argument allows you to specify attributes in the
387"stat" object that you are interested in. It is a comma-separated
388list of attribute names. If given, each returned "stat" object will
389contain only elements from that list.
390
391** /host
392
393Return statistics for all monitored hosts. The result is returned as
394an array of JSON "stat" objects (described above).
395
396This is an experimental endpoint. Be careful with it, as it may cause
397considerable strain on the server.
398
399** /match/[HOST]?[select=HOSTLIST]
400
401Return monitored names that correspond to *HOST* or *HOSTLIST*. *HOSTLIST*
402is a comma-separated list of host names or IPv4 addresses, *HOST* is a
403single such address. Both *HOST* and *HOSTLIST* can be supplied:
404=/match/HOST?select=HOSTLIST= is equivalent to
405=/match?select=HOST,HOSTLIST=.
406
407Each name in the resulting list is resolved and monitored hosts
408with IPs matching any of its IPv4 addresses are returned as an
409array of JSON objects. Each element in the array describes a single
410host from the list and has the following attributes:
411
412- "name": string ::
413 Name under which this host appears in the *HOSTLIST*.
414
415- "hosts": array of strings ::
416 Array of monitored names corresponding to this "name". Each name
417 from the array can be used as argument in a GET request to the
418 */host* endpoint.
419
420 This array is empty if none of the IP addresses of this "name" are
421 monitored by the server.
422
423If any error occurred during processing, the following attribute is
424added as well:
425
426- "error": string ::
427 Textual description of the error.
428
429** /config
430
431Return current server configuration as a JSON object.
432
433** /config/KEYWORD
434
435Return the value of a particular configuration setting.
436
437* Updating configuration on the fly.
438
439The following requests allow administrator to update the IP list
440without reloading the server. For the purpose of updating the
441IP list is sectioned in two parts:
442
443- 1. Immutable IP addresses ::
444 These are IP addresses specified in the configuration file via
445 the =ip-list= statement. These addresses cannot be modified using
446 the API described in this section. An attempt to do so will return
447 an error status.
448
449- 2. Mutable IP addresses ::
450 These are additional IP addresses configured via this API.
451 The mutable IP addresses are saved in the file
452 */var/lib/ping903/ip-list* before starting next ping probe.
453 This file is read upon start-up, after all files supplied
454 in the configuration have been read and processed. This ensures
455 that the mutable IP address list persists between restarts.
456
457** POST /config/ip-list
458
459Adds one or more IP addresses to the list. The request must have
460the content type "application/json". The content can be either an
461array of IP addresses in dotted-quad representation (or hostnames
462that can be resolved to IPv4 addresses) or an object. The latter
463must contain the attribute "ip-list" whose value is an array of
464IP addresses formatted as described above, and the "mode" attribute.
465If "mode" has the value "replace", the new addresses will replace
466the current content of the ip-list. If its value is "append", the
467new addresses will be appended to the ip-list.
468
469On success, returns 200 (OK). On error, returns a meaningful error
470status. If the error response has the content type
471"application/json", the returned JSON object describes the error in
472detail. It contains at least the "message" attribute with a
473descriptive explanation of the error. If the error refers to an
474element of the "ip-list" array, the "index" attribute contains the
4751-based index of that element in the array.
476
477** PUT /config/ip-list/IP
478
479Adds IP to the current IP list. Returns HTTP status 201 (Created) on
480success. On error, the following codes can be returned:
481
482- 403 (Forbidden) ::
483 The entry for this IP address already exists or (if a hostname is
484 given) the argument cannot be resolved to a IPv4 address. If the
485 Content-Type of the response is "application/json", the "message"
486 attribute of the returned JSON object supplies an explanation of
487 the error.
488- 500 (Internal server error) ::
489 Ping903 was unable to fulfill the request. See log files for a
490 detailed diagnostics.
491
492** DELETE /config/ip-list/IP-OR-HOSTNAME
493
494Deletes *IP-OR-HOSTNAME* from the IP list. Returns 200 (OK) on success.
495If *IP-OR-HOSTNAME* was not found in the IP list or is immutable,
496returns 404 (Not found).
497
498All update requests are queued and take effect at the beginning of the
499next ping probe.
500
501* References
502
503Ping903 is documented in the following manual pages:
504
505- [[http://man.gnu.org.ua/manpage/?8+ping903][ping903]](8) :: Documentation for the ping903 server program.
506- [[http://man.gnu.org.ua/manpage/?5+ping903.conf][ping903.conf]](5) :: Documents the ping903 configuration.
507- [[http://man.gnu.org.ua/manpage/?1+ping903q][ping903q]](1) :: Documents the ping903 query program.
508- [[http://man.gnu.org.ua/manpage/?5+ping903.cred][ping903.cred]](5) :: Documents format of the user's credential storage file.
509
510* Bug reports
511
512If you think you found a bug in *ping903* or its documentation, please
513send a mail to [[mailto:gray@gnu.org][Sergey Poznyakoff]] or use the bug tracker at
514https://puszcza.gnu.org.ua/bugs/?group=ping903 (requires authorization).
515
516* Copyright
517
518Copyright (C) 2020 Sergey Poznyakoff
519
520Permission is granted to anyone to make or distribute verbatim copies
521of this document as received, in any medium, provided that the
522copyright notice and this permission notice are preserved,
523thus giving the recipient permission to redistribute in turn.
524
525Permission is granted to distribute modified versions
526of this document, or of portions of it,
527under the above conditions, provided also that they
528carry prominent notices stating who last changed them.
529
530* Document settings :noexport:
531
532Please ignore this section. It supplies the variables necessary for
533proper rendering of this document.
534
535:PROPERTIES:
536:VISIBILITY: folded
537:END:
538
539#+TITLE: ping903
540#+STARTUP: showall
541#+EXCLUDE_TAGS: noexport
542#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css" />
543#+OPTIONS: ^:nil
544
545# Local Variables:
546# mode: org
547# paragraph-separate: "[ ^L]*$"
548# version-control: never
549# End:
diff --git a/maint/style.css b/maint/style.css
new file mode 100644
index 0000000..2304fb5
--- /dev/null
+++ b/maint/style.css
@@ -0,0 +1,85 @@
1/* Basic settings */
2body {
3 margin-left: auto;
4 margin-right: auto;
5 max-width: 80em;
6 background-color: silver;
7 padding: 4px;
8}
9html {}
10div {
11 background-color: white;
12}
13
14div#content {
15 margin-top: 2em;
16 margin-left: 5%;
17 margin-right: 5%;
18 padding: 1em;
19 border: 1px solid black;
20}
21
22div#postamble {
23 margin-bottom: 2em;
24 margin-left: 5%;
25 margin-right: 5%;
26 border: 1px solid black;
27 font-size: 80%;
28 padding: 4px;
29}
30
31.title { text-align: center; }
32.todo { color: red; }
33.done { color: green; }
34.tag { background-color: #add8e6; font-weight:normal }
35.target { }
36.timestamp { color: #bebebe; }
37.timestamp-kwd { color: #5f9ea0; }
38.right {margin-left:auto; margin-right:0px; text-align:right;}
39.left {margin-left:0px; margin-right:auto; text-align:left;}
40.center {margin-left:auto; margin-right:auto; text-align:center;}
41p.verse { margin-left: 3% }
42pre {
43 border: 1pt solid #AEBDCC;
44 background-color: #F3F5F7;
45 padding: 5pt;
46 font-family: courier, monospace;
47 font-size: 90%;
48 overflow:auto;
49}
50table { border-collapse: collapse; }
51td, th { vertical-align: top; }
52th.right { text-align:center; }
53th.left { text-align:center; }
54th.center { text-align:center; }
55td.right { text-align:right; }
56td.left { text-align:left; }
57td.center { text-align:center; }
58dt { font-weight: bold; }
59div.figure { padding: 0.5em; }
60div.figure p { text-align: center; }
61div.inlinetask {
62 padding:10px;
63 border:2px solid gray;
64 margin:10px;
65 background: #ffffcc;
66}
67textarea { overflow-x: auto; }
68.linenr { font-size:smaller }
69.code-highlighted {
70 background-color:#ffff00;
71}
72.org-info-js_info-navigation {
73 border-style:none;
74}
75#org-info-js_console-label {
76 font-size:10px;
77 font-weight:bold;
78 white-space:nowrap;
79}
80.org-info-js_search-highlight {
81 background-color:#ffff00;
82 color:#000000;
83 font-weight:bold;
84}
85
diff --git a/src/remoteip.c b/src/remoteip.c
index 573b69d..2966eca 100644
--- a/src/remoteip.c
+++ b/src/remoteip.c
@@ -48,7 +48,7 @@ str_is_ipv4(const char *addr)
48 return (dot_count == 3); 48 return (dot_count == 3);
49} 49}
50 50
51#define PFXSTR_IPV4_MAPPED "::ffff:" 51#define PFXSTR_IPV4_MAPPED "::ffff"
52#define PFXLEN_IPV4_MAPPED (sizeof PFXSTR_IPV4_MAPPED - 1) 52#define PFXLEN_IPV4_MAPPED (sizeof PFXSTR_IPV4_MAPPED - 1)
53 53
54static int 54static int
@@ -217,7 +217,7 @@ str_to_cidr(char const *str, struct cidr *cidr,
217 if (*end == 0) 217 if (*end == 0)
218 masklen_to_netmask(cidr->netmask, cidr->len, masklen); 218 masklen_to_netmask(cidr->netmask, cidr->len, masklen);
219 else if ((cidr->family == AF_INET && str_is_ipv4(p)) 219 else if ((cidr->family == AF_INET && str_is_ipv4(p))
220 || (cidr->family == AF_INET6 && str_is_ipv6(ipbuf))) { 220 || (cidr->family == AF_INET6 && str_is_ipv6(p))) {
221 rc = inet_pton(cidr->family, p, &inaddr); 221 rc = inet_pton(cidr->family, p, &inaddr);
222 if (rc != 1) { 222 if (rc != 1) {
223 error(file, line, "bad netmask: %s", 223 error(file, line, "bad netmask: %s",

Return to:

Send suggestions and report system problems to the System administrator.