Drift back into the dark ages and use inet_addr() instead of inet_aton().

For Solaris and similarly handicapped systems.
This commit is contained in:
abs 1999-11-09 17:22:15 +00:00
parent 81858e0734
commit d6d150908a
2 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,7 @@
$NetBSD: patch-sum,v 1.4 1999/11/09 16:14:59 abs Exp $
$NetBSD: patch-sum,v 1.5 1999/11/09 17:22:15 abs Exp $
MD5 (patch-aa) = ebd4b9f4a796be4616eb8e7dfcd94ff1
MD5 (patch-ab) = ce6f24895e645758ebd608a361b55cd5
MD5 (patch-ac) = 8e21f9df160a1c36d7e8da66445bd792
MD5 (patch-ad) = 92441253e24f78b9658c6a3a975cf245
MD5 (patch-ad) = eba2870b3430abcdd3ed94ecec4dadbe
MD5 (patch-ae) = a0809132cb27e911e5712252068d3e4c

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ad,v 1.1 1999/11/05 13:52:52 abs Exp $
--- src/misc.c.orig Fri Nov 5 06:44:40 1999
+++ src/misc.c Fri Nov 5 10:37:17 1999
@@ -652,3 +652,40 @@
$NetBSD: patch-ad,v 1.2 1999/11/09 17:22:16 abs Exp $
--- src/misc.c.orig Tue Sep 14 09:46:53 1999
+++ src/misc.c Tue Nov 9 16:27:25 1999
@@ -652,3 +652,41 @@
AddClassToHeap(CanonifyName(VDOMAIN));
}
@ -28,7 +28,8 @@ $NetBSD: patch-ad,v 1.1 1999/11/05 13:52:52 abs Exp $
+ */
+
+ /* This is also a convenient method to ensure valid dotted quad */
+if (inet_aton(netmask,&nm) && inet_aton(VIPADDRESS,&ip))
+if ( (nm.s_addr = inet_addr(netmask)) != INADDR_NONE &&
+ (ip.s_addr = inet_addr(VIPADDRESS)) != INADDR_NONE )
+ {
+ ip.s_addr &= nm.s_addr; /* Will not work with IPv6 */
+ strcpy(ipbuf,inet_ntoa(ip));