Lines Matching refs:cur
1093 dns_rpz_cidr_node_t *cur, *parent, *child, *new_parent, *sibling;
1102 cur = rpzs->cidr;
1106 if (cur == NULL) {
1130 if ((cur->sum.client_ip & set.client_ip) == 0 &&
1131 (cur->sum.ip & set.ip) == 0 &&
1132 (cur->sum.nsip & set.nsip) == 0) {
1145 dbit = diff_keys(tgt_ip, tgt_prefix, &cur->ip, cur->prefix);
1147 * dbit <= tgt_prefix and dbit <= cur->prefix always.
1151 if (tgt_prefix == cur->prefix) {
1155 if ((cur->set.client_ip & set.client_ip) != 0 ||
1156 (cur->set.ip & set.ip) != 0 ||
1157 (cur->set.nsip & set.nsip) != 0) {
1161 *found = cur;
1172 cur->set.client_ip |= tgt_set->client_ip;
1173 cur->set.ip |= tgt_set->ip;
1174 cur->set.nsip |= tgt_set->nsip;
1175 set_sum_pair(cur);
1176 *found = cur;
1183 * We know tgt_prefix < cur->prefix which means that
1190 new_parent = new_node(rpzs, tgt_ip, tgt_prefix, cur);
1198 child_num = DNS_RPZ_IP_BIT(&cur->ip, tgt_prefix);
1199 new_parent->child[child_num] = cur;
1200 cur->parent = new_parent;
1207 if (dbit == cur->prefix) {
1208 if ((cur->set.client_ip & set.client_ip) != 0 ||
1209 (cur->set.ip & set.ip) != 0 ||
1210 (cur->set.nsip & set.nsip) != 0) {
1218 *found = cur;
1220 cur->set.client_ip);
1222 cur->set.ip);
1224 cur->set.nsip);
1226 parent = cur;
1228 cur = cur->child[cur_num];
1234 * dbit < tgt_prefix and dbit < cur->prefix,
1245 new_parent = new_node(rpzs, tgt_ip, dbit, cur);
1257 new_parent->child[1-child_num] = cur;
1258 cur->parent = new_parent;
1455 dns_rpz_cidr_node_t *cur, *child, *parent;
1457 cur = rpzs->cidr;
1458 while (cur != NULL) {
1460 child = cur->child[0];
1462 cur = child;
1465 child = cur->child[1];
1467 cur = child;
1472 parent = cur->parent;
1476 parent->child[parent->child[1] == cur] = NULL;
1477 isc_mem_put(rpzs->mctx, cur, sizeof(*cur));
1478 cur = parent;