Ticket #9457: 102-v4v6-static-resolving.patch

File 102-v4v6-static-resolving.patch, 877 bytes (added by mzguanglin@…, 6 years ago)
  • src/forward.c

    a b  
    115115                                     unsigned short qtype, char *qdomain, int *type, char **domain, int *norebind) 
    116116                               
    117117{ 
     118  int type_backup = *type; 
     119  int norebind_backup = *norebind; 
     120 
    118121  /* If the query ends in the domain in one of our servers, set 
    119122     domain to point to that name. We find the largest match to allow both 
    120123     domain.org and sub.domain.org to exist. */ 
     
    203206        logflags = F_NEG | qtype; 
    204207   
    205208      log_query(logflags | flags | F_CONFIG | F_FORWARD, qdomain, *addrpp, NULL); 
     209 
     210      if (flags == F_NXDOMAIN || flags == F_NOERR) 
     211      { // added by xuwln(usa911@bupt.edu.cn) 
     212        flags = 0; 
     213        *type = type_backup; 
     214        *norebind = norebind_backup; 
     215      } 
    206216    } 
    207217  else if ((*type) & SERV_USE_RESOLV) 
    208218    {