Adjust for dot_quad_addr() changes
This commit is contained in:
parent
8c92070a91
commit
405991437d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scaffold.c,v 1.3 1997/11/16 21:30:25 christos Exp $ */
|
||||
/* $NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Routines for testing only. Not really industrial strength.
|
||||
|
@ -11,7 +11,7 @@
|
|||
#if 0
|
||||
static char sccs_id[] = "@(#) scaffold.c 1.5 95/01/03 09:13:48";
|
||||
#else
|
||||
__RCSID("$NetBSD: scaffold.c,v 1.3 1997/11/16 21:30:25 christos Exp $");
|
||||
__RCSID("$NetBSD: scaffold.c,v 1.4 1999/05/09 16:05:35 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -95,7 +95,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) == 0) {
|
||||
h.h_addr_list = addr_list;
|
||||
h.h_addr_list[0] = (char *) &addr;
|
||||
h.h_length = sizeof(addr);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $ */
|
||||
/* $NetBSD: tcpdchk.c,v 1.6 1999/05/09 16:05:35 christos Exp $ */
|
||||
|
||||
/*
|
||||
* tcpdchk - examine all tcpd access control rules and inetd.conf entries
|
||||
|
@ -21,7 +21,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) tcpdchk.c 1.7 96/02/11 17:01:34";
|
||||
#else
|
||||
__RCSID("$NetBSD: tcpdchk.c,v 1.5 1999/01/18 18:01:26 christos Exp $");
|
||||
__RCSID("$NetBSD: tcpdchk.c,v 1.6 1999/05/09 16:05:35 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -421,6 +421,7 @@ char *pat;
|
|||
{
|
||||
char *mask;
|
||||
int addr_count = 1;
|
||||
struct in_addr dummy;
|
||||
|
||||
if (pat[0] == '@') { /* @netgroup */
|
||||
#ifdef NO_NETGRENT
|
||||
|
@ -440,8 +441,8 @@ char *pat;
|
|||
#endif
|
||||
#endif
|
||||
} else if ((mask = split_at(pat, '/')) != NULL) { /* network/netmask */
|
||||
if (dot_quad_addr(pat) == INADDR_NONE
|
||||
|| dot_quad_addr(mask) == INADDR_NONE)
|
||||
if (dot_quad_addr(pat, &dummy) != 0
|
||||
|| dot_quad_addr(mask, &dummy) != 0)
|
||||
tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
|
||||
} else if (STR_EQ(pat, "FAIL")) { /* obsolete */
|
||||
tcpd_warn("FAIL is no longer recognized");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcpdmatch.c,v 1.4 1998/03/05 18:23:31 christos Exp $ */
|
||||
/* $NetBSD: tcpdmatch.c,v 1.5 1999/05/09 16:06:33 christos Exp $ */
|
||||
|
||||
/*
|
||||
* tcpdmatch - explain what tcpd would do in a specific case
|
||||
|
@ -20,7 +20,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
|
||||
#else
|
||||
__RCSID("$NetBSD: tcpdmatch.c,v 1.4 1998/03/05 18:23:31 christos Exp $");
|
||||
__RCSID("$NetBSD: tcpdmatch.c,v 1.5 1999/05/09 16:06:33 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -210,7 +210,7 @@ char **argv;
|
|||
* If a client address is specified, we simulate the effect of client
|
||||
* hostname lookup failure.
|
||||
*/
|
||||
if (dot_quad_addr(client) != INADDR_NONE) {
|
||||
if (dot_quad_addr(client, NULL) == 0) {
|
||||
request_set(&request, RQ_CLIENT_ADDR, client, 0);
|
||||
tcpdmatch(&request);
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in New Issue