Home | History | Annotate | Download | only in src

Lines Matching defs:crecp

943   struct crec *crecp;
949 if ((crecp = cache_find_by_name(NULL, name, now, F_IPV4 | F_IPV6)) &&
950 (crecp->flags & (F_HOSTS | F_DHCP)))
1115 static unsigned long crec_ttl(struct crec *crecp, time_t now)
1120 if (crecp->flags & (F_IMMORTAL | F_DHCP))
1123 return crecp->ttd - now;
1140 struct crec *crecp;
1270 else if ((crecp = cache_find_by_addr(NULL, &addr, now, is_arpa)))
1274 if (qtype == T_ANY && !(crecp->flags & (F_HOSTS | F_DHCP)))
1277 if (crecp->flags & F_NEG)
1281 if (crecp->flags & F_NXDOMAIN)
1284 log_query(crecp->flags & ~F_FORWARD, name, &addr, NULL);
1286 else if ((crecp->flags & (F_HOSTS | F_DHCP)) || !sec_reqd)
1289 if (!(crecp->flags & (F_HOSTS | F_DHCP)))
1293 log_query(crecp->flags & ~F_FORWARD, cache_get_name(crecp), &addr,
1294 record_source(crecp->uid));
1297 crec_ttl(crecp, now), NULL,
1298 T_PTR, C_IN, "d", cache_get_name(crecp)))
1302 } while ((crecp = cache_find_by_addr(crecp, &addr, now, is_arpa)));
1373 if ((crecp = cache_find_by_name(NULL, name, now, flag | F_CNAME)))
1381 struct crec *save = crecp;
1383 if ((crecp->flags & F_HOSTS) &&
1384 is_same_net(*((struct in_addr *)&crecp->addr), local_addr, local_netmask))
1389 } while ((crecp = cache_find_by_name(crecp, name, now, flag | F_CNAME)));
1390 crecp = save;
1397 if (qtype == T_ANY && !(crecp->flags & (F_HOSTS | F_DHCP)))
1400 if (crecp->flags & F_CNAME)
1404 log_query(crecp->flags, name, NULL, record_source(crecp->uid));
1406 crec_ttl(crecp, now), &nameoffset,
1407 T_CNAME, C_IN, "d", cache_get_name(crecp->addr.cname.cache)))
1411 strcpy(name, cache_get_name(crecp->addr.cname.cache));
1415 if (crecp->flags & F_NEG)
1419 if (crecp->flags & F_NXDOMAIN)
1422 log_query(crecp->flags, name, NULL, NULL);
1424 else if ((crecp->flags & (F_HOSTS | F_DHCP)) || !sec_reqd)
1429 (crecp->flags & F_HOSTS) &&
1430 !is_same_net(*((struct in_addr *)&crecp->addr), local_addr, local_netmask))
1433 if (!(crecp->flags & (F_HOSTS | F_DHCP)))
1439 log_query(crecp->flags & ~F_REVERSE, name, &crecp->addr.addr,
1440 record_source(crecp->uid));
1443 crec_ttl(crecp, now), NULL, type, C_IN,
1444 type == T_A ? "4" : "6", &crecp->addr))
1448 } while ((crecp = cache_find_by_name(crecp, name, now, flag | F_CNAME)));
1568 crecp = NULL;
1569 while ((crecp = cache_find_by_name(crecp, rec->target, now, F_IPV4 | F_IPV6)))
1572 int type = crecp->flags & F_IPV4 ? T_A : T_AAAA;
1576 if (crecp->flags & F_NEG)
1580 crec_ttl(crecp, now), NULL, type, C_IN,
1581 crecp->flags & F_IPV4 ? "4" : "6", &crecp->addr))