| 280 | } |
| 281 | |
| 282 | static void |
| 283 | sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_addr_lock) |
| 284 | { |
| 285 | struct sctp_ifn *found; |
| 286 | |
| 287 | found = sctp_find_ifn(sctp_ifnp->ifn_p, sctp_ifnp->ifn_index); |
| 288 | if (found == NULL) { |
| 289 | /* Not in the list.. sorry */ |
| 290 | return; |
| 291 | } |
| 292 | if (hold_addr_lock == 0) { |
| 293 | SCTP_IPI_ADDR_WLOCK(); |
| 294 | } else { |
| 295 | SCTP_IPI_ADDR_WLOCK_ASSERT(); |
| 296 | } |
| 297 | LIST_REMOVE(sctp_ifnp, next_bucket); |
| 298 | LIST_REMOVE(sctp_ifnp, next_ifn); |
| 299 | if (hold_addr_lock == 0) { |
| 300 | SCTP_IPI_ADDR_WUNLOCK(); |
| 301 | } |
| 302 | /* Take away the reference, and possibly free it */ |
| 303 | sctp_free_ifn(sctp_ifnp); |
| 304 | } |
| 305 | |
| 306 | void |
| 307 | sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, |
no test coverage detected