From 2190adec411378f2e4ad1aa5e82989febfbfae3d Mon Sep 17 00:00:00 2001 From: msmith Date: Wed, 23 Apr 1997 11:03:10 +0000 Subject: Don't call getnetbyname() on a netmask. On a system with a slow net connection, a large set of network exports could take many minutes to time out, giving the appearance of a total hang during boot. --- usr.sbin/mountd/mountd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/mountd') diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 3a45237..10c43a1 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -43,7 +43,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */ static const char rcsid[] = - "$Id: mountd.c,v 1.18 1997/04/09 20:17:15 guido Exp $"; + "$Id: mountd.c,v 1.19 1997/04/22 10:37:27 dfr Exp $"; #endif /*not lint*/ #include @@ -1707,7 +1707,7 @@ get_net(cp, net, maskflg) struct in_addr inetaddr, inetaddr2; char *name; - if (np = getnetbyname(cp)) + if (!maskflg && (np = getnetbyname(cp))) inetaddr = inet_makeaddr(np->n_net, 0); else if (isdigit(*cp)) { if ((netaddr = inet_network(cp)) == -1) -- cgit v1.1