Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 2816,2826 ****
esph_ptr = (esph_t *)(udpha + 1);
}
esph_ptr->esph_spi = assoc->ipsa_spi;
! esph_ptr->esph_replay = htonl(atomic_add_32_nv(&assoc->ipsa_replay, 1));
if (esph_ptr->esph_replay == 0 && assoc->ipsa_replay_wsize != 0) {
/*
* XXX We have replay counter wrapping.
* We probably want to nuke this SA (and its peer).
*/
--- 2816,2826 ----
esph_ptr = (esph_t *)(udpha + 1);
}
esph_ptr->esph_spi = assoc->ipsa_spi;
! esph_ptr->esph_replay = htonl(atomic_inc_32_nv(&assoc->ipsa_replay));
if (esph_ptr->esph_replay == 0 && assoc->ipsa_replay_wsize != 0) {
/*
* XXX We have replay counter wrapping.
* We probably want to nuke this SA (and its peer).
*/