httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/modules/arch/netware mod_nw_ssl.c
Date Wed, 25 Aug 2004 19:13:28 GMT
bnicholes    2004/08/25 12:13:28

  Modified:    modules/arch/netware mod_nw_ssl.c
  Log:
  Allow multiple IP addresses to be configured for the same secure port
  
  Revision  Changes    Path
  1.21      +18 -9     httpd-2.0/modules/arch/netware/mod_nw_ssl.c
  
  Index: mod_nw_ssl.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/netware/mod_nw_ssl.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_nw_ssl.c	13 Jul 2004 19:30:58 -0000	1.20
  +++ mod_nw_ssl.c	25 Aug 2004 19:13:28 -0000	1.21
  @@ -482,7 +482,7 @@
       if (!port) 
   	    return "Port must be numeric";
   	    
  -    apr_table_set(sc->sltable, ports, addr);
  +    apr_table_add(sc->sltable, ports, addr);
       
       new->local_addr.sin_port = htons(port);
       new->fd = -1;
  @@ -681,20 +681,29 @@
       return merged;
   }
   
  +static int compare_ipports(void *rec, const char *key, const char *value)
  +{
  +    conn_rec *c = (conn_rec*)rec;
  +
  +    if (value && 
  +        ((strcmp(value, "0.0.0.0") == 0) || (strcmp(value, c->local_ip) == 0))) 
  +    {
  +        return 0;
  +    }
  +    return 1;
  +}
  +
   static int isSecureConnEx (const server_rec *s, const conn_rec *c, const apr_table_t *t)
   {
  -    NWSSLSrvConfigRec *sc = get_nwssl_cfg(s);
  -    const char *s_secure = NULL;
       char port[8];
  -    int ret = 0;
   
       itoa((c->local_addr)->port, port, 10);
  -    s_secure = apr_table_get(t, port); 
  -    if (s_secure && 
  -        ((strcmp(s_secure, "0.0.0.0") == 0) || (strcmp(s_secure, c->local_ip) == 0)))
  -        ret = 1;
  +    if (!apr_table_do(compare_ipports, (void*)c, t, port, NULL))
  +    {
  +        return 1;
  +    }
   
  -    return ret;
  +    return 0;
   }
   
   static int isSecureConn (const server_rec *s, const conn_rec *c)
  
  
  

Mime
View raw message