Skip to content

Commit

Permalink
sctp: cleanup
Browse files Browse the repository at this point in the history
No functional change intended.

MFC after:	3 days
  • Loading branch information
tuexen committed Oct 24, 2024
1 parent ce20b48 commit e4ac018
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions sys/netinet/sctp_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,17 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index)
struct sctp_ifn *sctp_ifnp;
struct sctp_ifnlist *hash_ifn_head;

/*
* We assume the lock is held for the addresses if that's wrong
* problems could occur :-)
*/
SCTP_IPI_ADDR_LOCK_ASSERT();
hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))];
LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) {
if (sctp_ifnp->ifn_index == ifn_index) {
return (sctp_ifnp);
break;
}
if (sctp_ifnp->ifn_p && ifn && (sctp_ifnp->ifn_p == ifn)) {
return (sctp_ifnp);
if (ifn != NULL && sctp_ifnp->ifn_p == ifn) {
break;
}
}
return (NULL);
return (sctp_ifnp);
}

struct sctp_vrf *
Expand Down

0 comments on commit e4ac018

Please sign in to comment.