summaryrefslogtreecommitdiff
path: root/usr.sbin/pppd/auth.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-01 09:30:43 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-01 09:30:43 +0000
commit59a5dce293f1ff46f1aac565ab075e286491a59a (patch)
treedc92d87aa57add828719483bd586130cc0dabd46 /usr.sbin/pppd/auth.c
parentd3264157fabef85962944f88a575e0184cbbc0ac (diff)
Force mask to ~0 only if hostname (kudos to james@squish.net)
Diffstat (limited to 'usr.sbin/pppd/auth.c')
-rw-r--r--usr.sbin/pppd/auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c
index 50de16d37f0..fd12cf11ab9 100644
--- a/usr.sbin/pppd/auth.c
+++ b/usr.sbin/pppd/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.16 1999/08/06 20:41:07 deraadt Exp $ */
+/* $OpenBSD: auth.c,v 1.17 2001/01/01 09:30:42 angelos Exp $ */
/*
* auth.c - PPP authentication and phase control.
@@ -38,7 +38,7 @@
#if 0
static char rcsid[] = "Id: auth.c,v 1.37 1998/03/26 04:46:03 paulus Exp $";
#else
-static char rcsid[] = "$OpenBSD: auth.c,v 1.16 1999/08/06 20:41:07 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: auth.c,v 1.17 2001/01/01 09:30:42 angelos Exp $";
#endif
#endif
@@ -1236,7 +1236,7 @@ ip_addr_check(addr, addrs)
}
hp = gethostbyname(ptr_word);
- if (hp != NULL && hp->h_addrtype == AF_INET) {
+ if (hp != NULL && hp->h_addrtype == AF_INET && hp->h_name != NULL) {
ina.s_addr = *(u_int32_t *)hp->h_addr;
mask = ~ (u_int32_t) 0; /* are we sure we want this? */
} else {