summaryrefslogtreecommitdiff
path: root/libexec/tcpd/tcpdchk
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-06 15:34:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-06-06 15:34:58 +0000
commitd2e5e69ed2deb05c0347f4be15832edc6a542de7 (patch)
treebed0c7cd5f6302b76511ac8416f8f31b90677ed7 /libexec/tcpd/tcpdchk
parentc984e0aca85a96a37b4fede1fbb6d8f697bdd207 (diff)
use dot_quad_addr_new() as required
Diffstat (limited to 'libexec/tcpd/tcpdchk')
-rw-r--r--libexec/tcpd/tcpdchk/scaffold.c6
-rw-r--r--libexec/tcpd/tcpdchk/tcpdchk.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/libexec/tcpd/tcpdchk/scaffold.c b/libexec/tcpd/tcpdchk/scaffold.c
index 4d8c62b9d98..14bf223b526 100644
--- a/libexec/tcpd/tcpdchk/scaffold.c
+++ b/libexec/tcpd/tcpdchk/scaffold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scaffold.c,v 1.1 1997/02/26 06:17:07 downsj Exp $ */
+/* $OpenBSD: scaffold.c,v 1.2 1999/06/06 15:34:57 deraadt Exp $ */
/*
* Routines for testing only. Not really industrial strength.
@@ -10,7 +10,7 @@
#if 0
static char sccs_id[] = "@(#) scaffold.c 1.5 95/01/03 09:13:48";
#else
-static char rcsid[] = "$OpenBSD: scaffold.c,v 1.1 1997/02/26 06:17:07 downsj Exp $";
+static char rcsid[] = "$OpenBSD: scaffold.c,v 1.2 1999/06/06 15:34:57 deraadt Exp $";
#endif
#endif
@@ -93,7 +93,7 @@ char *host;
/*
* Host address: translate it to internal form.
*/
- if ((addr.s_addr = dot_quad_addr(host)) != INADDR_NONE) {
+ if (dot_quad_addr(host, &addr.s_addr)) {
h.h_addr_list = addr_list;
h.h_addr_list[0] = (char *) &addr;
h.h_length = sizeof(addr);
diff --git a/libexec/tcpd/tcpdchk/tcpdchk.c b/libexec/tcpd/tcpdchk/tcpdchk.c
index 56ab3940d54..ff076901616 100644
--- a/libexec/tcpd/tcpdchk/tcpdchk.c
+++ b/libexec/tcpd/tcpdchk/tcpdchk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdchk.c,v 1.2 1999/05/23 17:19:23 aaron Exp $ */
+/* $OpenBSD: tcpdchk.c,v 1.3 1999/06/06 15:34:57 deraadt Exp $ */
/*
* tcpdchk - examine all tcpd access control rules and inetd.conf entries
@@ -20,7 +20,7 @@
#if 0
static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
#else
-static char rcsid[] = "$OpenBSD: tcpdchk.c,v 1.2 1999/05/23 17:19:23 aaron Exp $";
+static char rcsid[] = "$OpenBSD: tcpdchk.c,v 1.3 1999/06/06 15:34:57 deraadt Exp $";
#endif
#endif
@@ -431,8 +431,7 @@ char *pat;
#endif
#endif
} else if ((mask = split_at(pat, '/'))) { /* network/netmask */
- if (dot_quad_addr(pat) == INADDR_NONE
- || dot_quad_addr(mask) == INADDR_NONE)
+ if (!dot_quad_addr_new(pat, NULL) || !dot_quad_addr_new(mask, NULL))
tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
} else if (STR_EQ(pat, "FAIL")) { /* obsolete */
tcpd_warn("FAIL is no longer recognized");