From tejblum@arc.hq.cti.ru  Tue Feb  4 11:20:13 1997
Received: from arc.hq.cti.ru (arc.hq.cti.ru [194.67.85.50])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA06400
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 4 Feb 1997 11:20:11 -0800 (PST)
Received: (from tejblum@localhost) by arc.hq.cti.ru (8.7.5/8.7.3) id WAA16049; Tue, 4 Feb 1997 22:20:07 +0300 (MSK)
Message-Id: <199702041920.WAA16049@arc.hq.cti.ru>
Date: Tue, 4 Feb 1997 22:20:07 +0300 (MSK)
From: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Reply-To: tejblum@arc.hq.cti.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: ypserv thinks there is no computers in network 10.1.2.3 netmask 255.255.255.0
X-Send-Pr-Version: 3.2

>Number:         2657
>Category:       bin
>Synopsis:       ypserv thinks there is no computers in network 10.1.2.3 netmask 255.255.255.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb  4 11:30:01 PST 1997
>Closed-Date:    Mon May 4 07:56:23 PDT 1998
>Last-Modified:  Mon May  4 07:59:36 PDT 1998
>Originator:     Dmitrij Tejblum
>Release:        FreeBSD 2.2-BETA
>Organization:
CompTek International
>Environment:

	

>Description:

With /var/yp/securenets file like

127.0.0.1 255.255.255.255
10.1.2.3 255.255.255.0

ypserv refuses all questions. It is strange.

>How-To-Repeat:

See above

>Fix:
	
Apply this patch:

*** yp_access.c.orig	Mon Feb  3 13:13:43 1997
--- yp_access.c	Mon Feb  3 13:14:41 1997
***************
*** 168,173 ****
--- 168,175 ----
  			continue;
  		}
  
+ 		tmp->net.s_addr &= tmp->mask.s_addr;
+ 
  		tmp->next = securenets;
  		securenets = tmp;
  	}

>Release-Note:
>Audit-Trail:

From: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
To: Bill Fenner <fenner@parc.xerox.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/2657: ypserv thinks there is no computers in network 10.1.2.3 netmask 255.255.255.0
Date: Wed, 5 Feb 1997 15:13:55 +0300 (MSK)

 On Tue, 4 Feb 1997, Bill Fenner wrote:
 
 > ypserv is right.  Network numbers are normally specified with a "0" in the
 > host portion; in your case, the network number is 10.1.2.0 .  10.1.2.3 is
 > a host address on the network 10.1.2.0 .  Your patch simply allows people
 > to specify either a host address or the network number in the securenets
 > file.
 > 
 >   Bill
 > 
 
 	Yes, I know. This PR is "change-request". But I spent few hours
 before understood it. (Yes, I was stupid.) May be, ypserv should print
 warning about such wrong config? But it is more than 1 my line... And,
 after all, why my securenets file must differ from my ifconfig commands?
 
 							Dima
 

From: Bill Fenner <fenner@parc.xerox.com>
To: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Cc: Bill Fenner <fenner@parc.xerox.com>, freebsd-gnats-submit@freebsd.org
Subject: Re: bin/2657: ypserv thinks there is no computers in network 10.1.2.3 netmask 255.255.255.0 
Date: Wed, 5 Feb 1997 08:35:05 PST

 >after all, why my securenets file must differ from my ifconfig commands?
 
 IMHO, if we make this change to yp, then we need to make similar changes
 to anything that accepts a network number.  Otherwise, confusion will
 abound ("How come 'route' doesn't work when I use a host address, but
 it works for YP?").  I'd prefer to add a warning to ypserv until we
 make a project-wide decision to allow this kind of configuration.
 
   Bill

From: Bill Fenner <fenner@parc.xerox.com>
To: freebsd-gnats@freebsd.org, tejblum@arc.hq.cti.ru
Cc:  Subject: Re: bin/2657: ypserv thinks there is no computers in network 10.1.2.3 netmask 255.255.255.0
Date: Tue, 4 Feb 1997 21:21:59 PST

 ypserv is right.  Network numbers are normally specified with a "0" in the
 host portion; in your case, the network number is 10.1.2.0 .  10.1.2.3 is
 a host address on the network 10.1.2.0 .  Your patch simply allows people
 to specify either a host address or the network number in the securenets
 file.
 
   Bill
 
State-Changed-From-To: open->closed 
State-Changed-By: dt 
State-Changed-When: Mon May 4 07:56:23 PDT 1998 
State-Changed-Why:  
Originator think so. 
>Unformatted:
