/[svn]/hopm/branches/1.0.x/src/firedns.c
ViewVC logotype

Diff of /hopm/branches/1.0.x/src/firedns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5183 by michael, Sun Dec 28 23:34:22 2014 UTC revision 5184 by michael, Sun Dec 28 23:52:32 2014 UTC
# Line 195  firedns_init(void) Line 195  firedns_init(void)
195          while (buf[i] == ' ' || buf[i] == '\t')          while (buf[i] == ' ' || buf[i] == '\t')
196            ++i;            ++i;
197    
         /* glibc /etc/resolv.conf seems to allow ipv6 server names */  
198          if (i6 < FDNS_MAX)          if (i6 < FDNS_MAX)
199          {          {
200            if (inet_pton(AF_INET6, &buf[i], &addr6) > 0)            if (inet_pton(AF_INET6, &buf[i], &addr6) > 0)
# Line 239  firedns_init(void) Line 238  firedns_init(void)
238    }    }
239    
240    fclose(f);    fclose(f);
   
   if (i4 == 0 /* (yuck) */ && i6)  
   {  
     log_printf("FIREDNS -> No nameservers found in %s", file);  
     exit(EXIT_FAILURE);  
   }  
241  }  }
242    
243  /* immediate A query */  /* immediate A query */
# Line 263  firedns_resolveip4(const char *const nam Line 256  firedns_resolveip4(const char *const nam
256  struct in6_addr *  struct in6_addr *
257  firedns_resolveip6(const char * const name)  firedns_resolveip6(const char * const name)
258  {  {
259      static struct in6_addr addr;
260    
261      if (inet_pton(AF_INET6, name, &addr) > 0)
262        return &addr;
263    
264    return (struct in6_addr *)firedns_resolveip(FDNS_QRY_AAAA, name);    return (struct in6_addr *)firedns_resolveip(FDNS_QRY_AAAA, name);
265  }  }
266    

Legend:
Removed from v.5183  
changed lines
  Added in v.5184

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28