From owner-freebsd-bugs Sun Mar 31 06:40:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA26517 for bugs-outgoing; Sun, 31 Mar 1996 06:40:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA26495 Sun, 31 Mar 1996 06:40:02 -0800 (PST) Resent-Date: Sun, 31 Mar 1996 06:40:02 -0800 (PST) Resent-Message-Id: <199603311440.GAA26495@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, greg@greg.rim.or.jp 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 ; 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 X-Send-Pr-Version: 3.2 Subject: misc/1112: Can not work getnetbyaddr on NIS Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: