Lines Matching full:pr

66 prison_bcopy_primary_ip6(const struct prison *pr, struct in6_addr *ia6)  in prison_bcopy_primary_ip6()  argument
69 bcopy(prison_ip_get0(pr, PR_INET6), ia6, sizeof(struct in6_addr)); in prison_bcopy_primary_ip6()
110 struct prison *pr; in prison_get_ip6() local
115 pr = cred->cr_prison; in prison_get_ip6()
116 if (!(pr->pr_flags & PR_IP6)) in prison_get_ip6()
118 mtx_lock(&pr->pr_mtx); in prison_get_ip6()
119 if (!(pr->pr_flags & PR_IP6)) { in prison_get_ip6()
120 mtx_unlock(&pr->pr_mtx); in prison_get_ip6()
123 if (pr->pr_addrs[PR_INET6] == NULL) { in prison_get_ip6()
124 mtx_unlock(&pr->pr_mtx); in prison_get_ip6()
128 prison_bcopy_primary_ip6(pr, ia6); in prison_get_ip6()
129 mtx_unlock(&pr->pr_mtx); in prison_get_ip6()
143 struct prison *pr; in prison_saddrsel_ip6() local
152 pr = cred->cr_prison; in prison_saddrsel_ip6()
153 if (pr->pr_flags & PR_IP6_SADDRSEL) in prison_saddrsel_ip6()
204 struct prison *pr; in prison_local_ip6() local
210 pr = cred->cr_prison; in prison_local_ip6()
211 if (!(pr->pr_flags & PR_IP6)) in prison_local_ip6()
213 mtx_lock(&pr->pr_mtx); in prison_local_ip6()
214 if (!(pr->pr_flags & PR_IP6)) { in prison_local_ip6()
215 mtx_unlock(&pr->pr_mtx); in prison_local_ip6()
218 if (pr->pr_addrs[PR_INET6] == NULL) { in prison_local_ip6()
219 mtx_unlock(&pr->pr_mtx); in prison_local_ip6()
228 if (v6only != 0 && prison_ip_cnt(pr, PR_INET6) == 1) in prison_local_ip6()
229 prison_bcopy_primary_ip6(pr, ia6); in prison_local_ip6()
230 mtx_unlock(&pr->pr_mtx); in prison_local_ip6()
234 error = prison_check_ip6_locked(pr, ia6); in prison_local_ip6()
236 prison_bcopy_primary_ip6(pr, ia6); in prison_local_ip6()
240 mtx_unlock(&pr->pr_mtx); in prison_local_ip6()
252 struct prison *pr; in prison_remote_ip6() local
257 pr = cred->cr_prison; in prison_remote_ip6()
258 if (!(pr->pr_flags & PR_IP6)) in prison_remote_ip6()
260 mtx_lock(&pr->pr_mtx); in prison_remote_ip6()
261 if (!(pr->pr_flags & PR_IP6)) { in prison_remote_ip6()
262 mtx_unlock(&pr->pr_mtx); in prison_remote_ip6()
265 if (pr->pr_addrs[PR_INET6] == NULL) { in prison_remote_ip6()
266 mtx_unlock(&pr->pr_mtx); in prison_remote_ip6()
271 prison_check_ip6_locked(pr, ia6) == EADDRNOTAVAIL) { in prison_remote_ip6()
272 prison_bcopy_primary_ip6(pr, ia6); in prison_remote_ip6()
273 mtx_unlock(&pr->pr_mtx); in prison_remote_ip6()
280 mtx_unlock(&pr->pr_mtx); in prison_remote_ip6()
291 prison_check_ip6_locked(const struct prison *pr, const struct in6_addr *ia6) in prison_check_ip6_locked() argument
294 if (!(pr->pr_flags & PR_IP6)) in prison_check_ip6_locked()
297 return (prison_ip_check(pr, PR_INET6, ia6)); in prison_check_ip6_locked()
303 struct prison *pr; in prison_check_ip6() local
309 pr = cred->cr_prison; in prison_check_ip6()
310 if (!(pr->pr_flags & PR_IP6)) in prison_check_ip6()
312 mtx_lock(&pr->pr_mtx); in prison_check_ip6()
313 if (!(pr->pr_flags & PR_IP6)) { in prison_check_ip6()
314 mtx_unlock(&pr->pr_mtx); in prison_check_ip6()
317 if (pr->pr_addrs[PR_INET6] == NULL) { in prison_check_ip6()
318 mtx_unlock(&pr->pr_mtx); in prison_check_ip6()
322 error = prison_check_ip6_locked(pr, ia6); in prison_check_ip6()
323 mtx_unlock(&pr->pr_mtx); in prison_check_ip6()