Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

*** 2572,2582 **** phdr_ah->ah_length = (ah_align_sz >> 2) + 1; phdr_ah->ah_reserved = 0; phdr_ah->ah_spi = assoc->ipsa_spi; phdr_ah->ah_replay = ! htonl(atomic_add_32_nv(&assoc->ipsa_replay, 1)); if (phdr_ah->ah_replay == 0 && assoc->ipsa_replay_wsize != 0) { /* * XXX We have replay counter wrapping. We probably * want to nuke this SA (and its peer). */ --- 2572,2582 ---- phdr_ah->ah_length = (ah_align_sz >> 2) + 1; phdr_ah->ah_reserved = 0; phdr_ah->ah_spi = assoc->ipsa_spi; phdr_ah->ah_replay = ! htonl(atomic_inc_32_nv(&assoc->ipsa_replay)); if (phdr_ah->ah_replay == 0 && assoc->ipsa_replay_wsize != 0) { /* * XXX We have replay counter wrapping. We probably * want to nuke this SA (and its peer). */