Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Mar 1996 22:22:07 +0900 (JST)
From:      greg@greg.rim.or.jp
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        greg@greg.rim.or.jp
Subject:   misc/1112: Can not work getnetbyaddr on NIS
Message-ID:  <199603311322.WAA01223@apollon.greg.rim.or.jp>
Resent-Message-ID: <199603311440.GAA26495@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1112
>Category:       misc
>Synopsis:       Can not work getnetbyaddr on NIS
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 31 06:40:01 PST 1996
>Last-Modified:
>Originator:     Kensaku Masuda
>Organization:
>Release:        FreeBSD 2.2-960323-SNAP i386
>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")) {

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603311322.WAA01223>