| 2404 | } |
| 2405 | |
| 2406 | int |
| 2407 | sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa) |
| 2408 | { |
| 2409 | struct sctp_laddr *laddr; |
| 2410 | |
| 2411 | if (stcb == NULL) { |
| 2412 | /* There are no restrictions, no TCB :-) */ |
| 2413 | return (0); |
| 2414 | } |
| 2415 | LIST_FOREACH(laddr, &stcb->asoc.sctp_restricted_addrs, sctp_nxt_addr) { |
| 2416 | if (laddr->ifa == NULL) { |
| 2417 | SCTPDBG(SCTP_DEBUG_OUTPUT1, "%s: NULL ifa\n", |
| 2418 | __func__); |
| 2419 | continue; |
| 2420 | } |
| 2421 | if (laddr->ifa == ifa) { |
| 2422 | /* Yes it is on the list */ |
| 2423 | return (1); |
| 2424 | } |
| 2425 | } |
| 2426 | return (0); |
| 2427 | } |
| 2428 | |
| 2429 | int |
| 2430 | sctp_is_addr_in_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa) |
no outgoing calls
no test coverage detected