Changeset 4e80e1fce8d410fe4154c5bfd4d2495288cd4747

Show
Ignore:
Timestamp:
11/21/11 00:10:54 (3 years ago)
Author:
Ryan Phillips <ryan.phillips@rackspace.com>
git-committer:
Ryan Phillips <ryan.phillips@rackspace.com> 1321834254 -0600
git-parent:

[e520e98b8f3e66fdfa978ec0f096baad8a7dfb38]

git-author:
Ryan Phillips <ryan.phillips@rackspace.com> 1321834121 -0600
Message:

fix the resolver but preserve the old functionality

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    rdd420f2 r4e80e1f  
    588588  family = NOIT_CHECK_PREFER_V6(new_check) ? AF_INET6 : AF_INET; 
    589589  rv = inet_pton(family, ip_str, &a); 
    590   if(rv != 1 && !NOIT_CHECK_SINGLE_RESOLVE(new_check)) { 
    591     family = family == AF_INET ? AF_INET6 : AF_INET; 
    592     rv = inet_pton(family, ip_str, &a); 
    593     if(rv != 1) { 
    594       family = AF_INET; 
    595       memset(&a, 0, sizeof(a)); 
     590  if(rv != 1) { 
     591    if (!NOIT_CHECK_SINGLE_RESOLVE(new_check)) { 
     592      family = family == AF_INET ? AF_INET6 : AF_INET; 
     593      rv = inet_pton(family, ip_str, &a); 
     594      if(rv != 1) { 
     595        family = AF_INET; 
     596        memset(&a, 0, sizeof(a)); 
     597        failed = -1; 
     598      } 
     599    } else { 
    596600      failed = -1; 
    597601    }