From greg@greg.rim.or.jp  Sun Mar 31 06:33:35 1996
Received: from rayearth.rim.or.jp (uucp@rayearth.rim.or.jp [202.247.130.242])
          by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA26239
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 31 Mar 1996 06:33:33 -0800 (PST)
Received: (from uucp@localhost) by rayearth.rim.or.jp (8.7.5/3.4W3-uucp1) with UUCP
	id XAA03371 for FreeBSD-gnats-submit@freebsd.org; Sun, 31 Mar 1996 23:32:46 +0900 (JST)
Received: from apollon.greg.rim.or.jp (apollon.greg.rim.or.jp [172.31.1.2]) by atena.greg.rim.or.jp (8.6.12/3.4Wbeta6) with ESMTP id WAA27398; Sun, 31 Mar 1996 22:22:07 +0900
Received: (from greg@localhost) by apollon.greg.rim.or.jp (8.7.5/3.4Wbeta6) id WAA01223; Sun, 31 Mar 1996 22:22:07 +0900 (JST)
Message-Id: <199603311322.WAA01223@apollon.greg.rim.or.jp>
Date: Sun, 31 Mar 1996 22:22:07 +0900 (JST)
From: greg@greg.rim.or.jp
Reply-To: greg@greg.rim.or.jp
To: FreeBSD-gnats-submit@freebsd.org
Cc: greg@greg.rim.or.jp
Subject: Can not work getnetbyaddr on NIS
X-Send-Pr-Version: 3.2

>Number:         1112
>Category:       misc
>Synopsis:       Can not work getnetbyaddr on NIS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wpaul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 31 06:40:01 PST 1996
>Closed-Date:    Mon Oct 21 21:10:38 PDT 1996
>Last-Modified:  Tue Nov 27 18:52:54 PST 2001
>Originator:     Kensaku Masuda
>Release:        FreeBSD 2.2-960323-SNAP i386
>Organization:
>Environment:

	My /etc/host.conf is

# $Id: host.conf,v 1.2 1993/11/07 01:02:57 wollman Exp $
# Default is to use the nameserver first
# bind
# If that doesn't work, then try the /etc/hosts file
hosts
#bind
# If you have YP/NIS configured, uncomment the next line
nis

>Description:

	Don't work standard C library function that is "getnetbyaddr".
	I have sended to patch ( ID misc/1079 ), but commiter drop
	a one diference..... May be.

>How-To-Repeat:

	Running netstat command with -r option

>Fix:
	
diff -ruN net.original/getnetbynis.c net/getnetbynis.c
--- net.original/getnetbynis.c	Sun Oct 22 23:39:06 1995
+++ net/getnetbynis.c	Thu Mar 28 23:13:20 1996
@@ -122,7 +122,7 @@
 	if (type != AF_INET)
 		return (NULL);
 
-	in.s_addr = addr;
+	in.s_addr = htonl(addr);
 	str = inet_ntoa(in);
 	cp = str + strlen(str) - 2;
 	while(!strcmp(cp, ".0")) {

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->wpaul 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Tue Sep 24 17:18:55 PDT 1996 
Responsible-Changed-Why:  
Bill's area. 
State-Changed-From-To: open->closed 
State-Changed-By: wpaul 
State-Changed-When: Mon Oct 21 21:10:38 PDT 1996 
State-Changed-Why:  

This particular function was rewritten (for PR #1079) in such a way that 
this patch isn't needed anymore. It should work correctly now. 
>Unformatted:
