Changeset 4601

Show
Ignore:
Timestamp:
11/07/08 06:15:19 (2 months ago)
Author:
andreas
Message:

use of host_create_any() for %any address

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/libstrongswan/utils/host.c

    r4571 r4601  
    397397    if (streq(string, "%any")) 
    398398    { 
    399         string = "0.0.0.0"; 
    400         this->address.sa_family = AF_INET; 
     399        return host_create_any(AF_INET); 
    401400    } 
    402401    else if (strchr(string, '.')) 
     
    450449    int err, ret; 
    451450 
    452     if (af == AF_INET6 || strchr(string, ':') || streq(string, "%any")) 
    453     {/* gethostbyname does not like IPv6 addresses or wildcards - fallback */ 
     451    if (streq(string, "%any")) 
     452    { 
     453        return host_create_any(af ? af : AF_INET); 
     454    } 
     455    else if (strchr(string, ':')) 
     456    { 
     457        /* gethostbyname does not like IPv6 addresses - fallback */ 
    454458        return host_create_from_string(string, port); 
    455459    }