The following reply was made to PR general/3011; it has been noted by GNATS.

From: Thomas Graf <[EMAIL PROTECTED]>
To: Marc Slemko <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: general/3011: Wrong order of bytes in IP address for Listen
         and VirtualHost directives
Date: Wed, 16 Sep 1998 17:29:24 +0000

 Marc Slemko wrote:
 
 > On 16 Sep 1998, Thomas Graf wrote:
 >
 > > Data General DG/UX for Intel
 >
 > What compiler are you using?
 >
 > >
 > > uname -a: dgux dms1 R4.20MU01 generic AViiON Pentium
 > > >Description:
 > > Named virtual hosts (3 names, 1 IP address) did not work until I gave the
 > > IP address in opposite order (least significant byte first).
 > > In this case:
 > > www.dms.at and dms1.essi.fr have the IP address 157.169.10.160. The
 > > NameVirtualHost and <VirtualHost> did not show an error (httpd -S), but 
 > > virtual
 > > hosts did not work.
 > > When I added the following directive in httpd.conf:
 > > Listen 157.169.10.160:80
 > > I got the error message:
 > > [Tue Sep 15 14:30:58 1998] [crit] (126)Can't assign requested address: 
 > > make_sock: could not bind to address 160.10.169.157 port 80
 > > Virtual hosts work since I replaced the IP address with 160.10.169.157.
 >
 > This really looks like a bogosity in the OS.
 >
 > What does the inet_network man page say WRT the byte order returned?
 >
 
  All Internet addresses are returned in network order (bytes ordered
  from left to right).  All network numbers and local address parts are
  returned as machine-format integer values.
 
 
 > If you compile and run the following program:
 >
 > #include <sys/types.h>
 > #include <sys/socket.h>
 > #include <netinet/in.h>
 > #include <arpa/inet.h>
 > #include <stdio.h>
 >
 > int main () {
 >         printf("inet_network(\"10.11.12.13\") = %ld\n",
 >                 inet_network("10.11.12.13"));
 > }
 >
 > what do you get?
 >
 
 The output of this program is:
 inet_network("10.11.12.13") = 168496141
 (which is the same as on my Linux 2.0.35 system).
 
 Thomas.
 

Reply via email to