Skip to content

Commit

Permalink
enforce locking, no functional change intended
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed Oct 10, 2024
1 parent dc9381f commit b9b3ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usrsctplib/netinet/sctp_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr,
/*-
* Add an ifa to an ifn.
* Register the interface as necessary.
* NOTE: ADDR write lock MUST be held.
*/
static void
sctp_add_ifa_to_ifn(struct sctp_ifn *sctp_ifnp, struct sctp_ifa *sctp_ifap)
{
int ifa_af;

SCTP_IPI_ADDR_WLOCK_ASSERT();
LIST_INSERT_HEAD(&sctp_ifnp->ifalist, sctp_ifap, next_ifa);
sctp_ifap->ifn_p = sctp_ifnp;
atomic_add_int(&sctp_ifap->ifn_p->refcount, 1);
Expand Down Expand Up @@ -473,11 +473,11 @@ sctp_add_ifa_to_ifn(struct sctp_ifn *sctp_ifnp, struct sctp_ifa *sctp_ifap)
* Remove an ifa from its ifn.
* If no more addresses exist, remove the ifn too. Otherwise, re-register
* the interface based on the remaining address families left.
* NOTE: ADDR write lock MUST be held.
*/
static void
sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap)
{
SCTP_IPI_ADDR_WLOCK_ASSERT();
LIST_REMOVE(sctp_ifap, next_ifa);
if (sctp_ifap->ifn_p) {
/* update address counts */
Expand Down

0 comments on commit b9b3ded

Please sign in to comment.