• Home
  • Raw
  • Download

Lines Matching refs:entry

64 static void netlbl_domhsh_free_entry(struct rcu_head *entry)  in netlbl_domhsh_free_entry()  argument
74 ptr = container_of(entry, struct netlbl_dom_map, rcu); in netlbl_domhsh_free_entry()
175 struct netlbl_dom_map *entry; in netlbl_domhsh_search_def() local
177 entry = netlbl_domhsh_search(domain, family); in netlbl_domhsh_search_def()
178 if (entry != NULL) in netlbl_domhsh_search_def()
179 return entry; in netlbl_domhsh_search_def()
181 entry = netlbl_domhsh_rcu_deref(netlbl_domhsh_def_ipv4); in netlbl_domhsh_search_def()
182 if (entry != NULL && entry->valid) in netlbl_domhsh_search_def()
183 return entry; in netlbl_domhsh_search_def()
186 entry = netlbl_domhsh_rcu_deref(netlbl_domhsh_def_ipv6); in netlbl_domhsh_search_def()
187 if (entry != NULL && entry->valid) in netlbl_domhsh_search_def()
188 return entry; in netlbl_domhsh_search_def()
208 static void netlbl_domhsh_audit_add(struct netlbl_dom_map *entry, in netlbl_domhsh_audit_add() argument
222 entry->domain ? entry->domain : "(default)"); in netlbl_domhsh_audit_add()
240 type = entry->def.type; in netlbl_domhsh_audit_add()
241 cipsov4 = entry->def.cipso; in netlbl_domhsh_audit_add()
242 calipso = entry->def.calipso; in netlbl_domhsh_audit_add()
274 static int netlbl_domhsh_validate(const struct netlbl_dom_map *entry) in netlbl_domhsh_validate() argument
283 if (entry == NULL) in netlbl_domhsh_validate()
286 if (entry->family != AF_INET && entry->family != AF_INET6 && in netlbl_domhsh_validate()
287 (entry->family != AF_UNSPEC || in netlbl_domhsh_validate()
288 entry->def.type != NETLBL_NLTYPE_UNLABELED)) in netlbl_domhsh_validate()
291 switch (entry->def.type) { in netlbl_domhsh_validate()
293 if (entry->def.cipso != NULL || entry->def.calipso != NULL || in netlbl_domhsh_validate()
294 entry->def.addrsel != NULL) in netlbl_domhsh_validate()
298 if (entry->family != AF_INET || in netlbl_domhsh_validate()
299 entry->def.cipso == NULL) in netlbl_domhsh_validate()
303 if (entry->family != AF_INET6 || in netlbl_domhsh_validate()
304 entry->def.calipso == NULL) in netlbl_domhsh_validate()
308 netlbl_af4list_foreach(iter4, &entry->def.addrsel->list4) { in netlbl_domhsh_validate()
324 netlbl_af6list_foreach(iter6, &entry->def.addrsel->list6) { in netlbl_domhsh_validate()
405 int netlbl_domhsh_add(struct netlbl_dom_map *entry, in netlbl_domhsh_add() argument
417 ret_val = netlbl_domhsh_validate(entry); in netlbl_domhsh_add()
427 if (entry->domain != NULL) in netlbl_domhsh_add()
428 entry_old = netlbl_domhsh_search(entry->domain, entry->family); in netlbl_domhsh_add()
430 entry_old = netlbl_domhsh_search_def(entry->domain, in netlbl_domhsh_add()
431 entry->family); in netlbl_domhsh_add()
433 entry->valid = 1; in netlbl_domhsh_add()
435 if (entry->domain != NULL) { in netlbl_domhsh_add()
436 u32 bkt = netlbl_domhsh_hash(entry->domain); in netlbl_domhsh_add()
437 list_add_tail_rcu(&entry->list, in netlbl_domhsh_add()
440 INIT_LIST_HEAD(&entry->list); in netlbl_domhsh_add()
441 switch (entry->family) { in netlbl_domhsh_add()
444 entry); in netlbl_domhsh_add()
448 entry); in netlbl_domhsh_add()
451 if (entry->def.type != in netlbl_domhsh_add()
464 entry->family = AF_INET; in netlbl_domhsh_add()
466 entry); in netlbl_domhsh_add()
478 if (entry->def.type == NETLBL_NLTYPE_ADDRSELECT) { in netlbl_domhsh_add()
480 &entry->def.addrsel->list4) in netlbl_domhsh_add()
481 netlbl_domhsh_audit_add(entry, iter4, NULL, in netlbl_domhsh_add()
485 &entry->def.addrsel->list6) in netlbl_domhsh_add()
486 netlbl_domhsh_audit_add(entry, NULL, iter6, in netlbl_domhsh_add()
490 netlbl_domhsh_audit_add(entry, NULL, NULL, in netlbl_domhsh_add()
493 entry->def.type == NETLBL_NLTYPE_ADDRSELECT) { in netlbl_domhsh_add()
502 netlbl_af4list_foreach_rcu(iter4, &entry->def.addrsel->list4) in netlbl_domhsh_add()
510 netlbl_af6list_foreach_rcu(iter6, &entry->def.addrsel->list6) in netlbl_domhsh_add()
520 &entry->def.addrsel->list4) { in netlbl_domhsh_add()
531 &entry->def.addrsel->list6) { in netlbl_domhsh_add()
542 netlbl_domhsh_free_entry(&entry->rcu); in netlbl_domhsh_add()
563 int netlbl_domhsh_add_default(struct netlbl_dom_map *entry, in netlbl_domhsh_add_default() argument
566 return netlbl_domhsh_add(entry, audit_info); in netlbl_domhsh_add_default()
581 int netlbl_domhsh_remove_entry(struct netlbl_dom_map *entry, in netlbl_domhsh_remove_entry() argument
593 if (entry == NULL) in netlbl_domhsh_remove_entry()
597 if (entry->valid) { in netlbl_domhsh_remove_entry()
598 entry->valid = 0; in netlbl_domhsh_remove_entry()
599 if (entry == rcu_dereference(netlbl_domhsh_def_ipv4)) in netlbl_domhsh_remove_entry()
601 else if (entry == rcu_dereference(netlbl_domhsh_def_ipv6)) in netlbl_domhsh_remove_entry()
604 list_del_rcu(&entry->list); in netlbl_domhsh_remove_entry()
616 entry->domain ? entry->domain : "(default)"); in netlbl_domhsh_remove_entry()
620 switch (entry->def.type) { in netlbl_domhsh_remove_entry()
622 netlbl_af4list_foreach_rcu(iter4, &entry->def.addrsel->list4) { in netlbl_domhsh_remove_entry()
627 netlbl_af6list_foreach_rcu(iter6, &entry->def.addrsel->list6) { in netlbl_domhsh_remove_entry()
634 cipso_v4_doi_putdef(entry->def.cipso); in netlbl_domhsh_remove_entry()
638 calipso_doi_putdef(entry->def.calipso); in netlbl_domhsh_remove_entry()
642 call_rcu(&entry->rcu, netlbl_domhsh_free_entry); in netlbl_domhsh_remove_entry()
671 struct netlbl_domaddr4_map *entry; in netlbl_domhsh_remove_af4() local
705 entry = netlbl_domhsh_addr4_entry(entry_addr); in netlbl_domhsh_remove_af4()
706 cipso_v4_doi_putdef(entry->def.cipso); in netlbl_domhsh_remove_af4()
707 kfree(entry); in netlbl_domhsh_remove_af4()
738 struct netlbl_domaddr6_map *entry; in netlbl_domhsh_remove_af6() local
770 entry = netlbl_domhsh_addr6_entry(entry_addr); in netlbl_domhsh_remove_af6()
771 calipso_doi_putdef(entry->def.calipso); in netlbl_domhsh_remove_af6()
772 kfree(entry); in netlbl_domhsh_remove_af6()
798 struct netlbl_dom_map *entry; in netlbl_domhsh_remove() local
804 entry = netlbl_domhsh_search(domain, AF_INET); in netlbl_domhsh_remove()
806 entry = netlbl_domhsh_search_def(domain, AF_INET); in netlbl_domhsh_remove()
807 ret_val = netlbl_domhsh_remove_entry(entry, audit_info); in netlbl_domhsh_remove()
815 entry = netlbl_domhsh_search(domain, AF_INET6); in netlbl_domhsh_remove()
817 entry = netlbl_domhsh_search_def(domain, AF_INET6); in netlbl_domhsh_remove()
818 ret_val2 = netlbl_domhsh_remove_entry(entry, audit_info); in netlbl_domhsh_remove()
941 int (*callback) (struct netlbl_dom_map *entry, void *arg), in netlbl_domhsh_walk()