Date: Sat, 23 Mar 1996 14:16:28 -0800 (PST) From: Bill Paul <wpaul> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/libc/net getnetbynis.c Message-ID: <199603232216.OAA15648@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
wpaul 96/03/23 14:16:27 Modified: lib/libc/net getnetbynis.c Log: Fix other half of problem reported in PR #1079: _getnetbynisaddr() is broken. The translation from network number to ASCII string was not working correctly (you would sometimes get things like 0.244.0.0 instead of 244.0.0). Also copied results of yp_match() to a static buffer for consistency with gethostbynis.c. Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks lookups) leaves the traling .0's in place. This means that the NIS and local file lookups will match different things when looking up the same network number. I'm not sure which is the correct behavior. (I think the DNS lookup code tries all combinations -- should the NIS and local host lookup routines do that too?) Revision Changes Path 1.5 +41 -12 src/lib/libc/net/getnetbynis.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603232216.OAA15648>