fielding 96/12/05 13:39:44
Modified: src http_main.c
Log:
Corrected magic number mistaken identity problem by replacing
the old magic number (which looked like a bug) with DEFAULT_VHOST_ADDR
and an appropriate comment.
Revision Changes Path
1.94 +6 -1 apache/src/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -C3 -r1.93 -r1.94
*** http_main.c 1996/12/05 00:33:26 1.93
--- http_main.c 1996/12/05 21:39:42 1.94
***************
*** 162,167 ****
--- 162,172 ----
int one_process = 0;
+ /* The address 255.255.255.255, when used as a virtualhost address,
+ * will become the "default" server when the ip doesn't match other vhosts.
+ */
+ #define DEFAULT_VHOST_ADDR 0xfffffffful
+
#if defined(USE_FCNTL_SERIALIZED_ACCEPT)
static struct flock lock_it = { F_WRLCK, 0, 0, 0 };
static struct flock unlock_it = { F_UNLCK, 0, 0, 0 };
***************
*** 1245,1251 ****
sar->host_addr.s_addr == server_ip.s_addr) &&
(sar->host_port == 0 || sar->host_port == port)) {
return virt;
! } else if ( sar->host_addr.s_addr == INADDR_NONE ) {
/* this is so that you can build a server that is the
"default" for any interface which isn't explicitly
specified. So that you can implement "deny anything
--- 1250,1256 ----
sar->host_addr.s_addr == server_ip.s_addr) &&
(sar->host_port == 0 || sar->host_port == port)) {
return virt;
! } else if ( sar->host_addr.s_addr == DEFAULT_VHOST_ADDR ) {
/* this is so that you can build a server that is the
"default" for any interface which isn't explicitly
specified. So that you can implement "deny anything