| 6830 | } |
| 6831 | |
| 6832 | static int |
| 6833 | key_acqreset(uint32_t seq) |
| 6834 | { |
| 6835 | struct secacq *acq; |
| 6836 | |
| 6837 | ACQ_LOCK(); |
| 6838 | LIST_FOREACH(acq, ACQSEQHASH_HASH(seq), seqhash) { |
| 6839 | if (acq->seq == seq) { |
| 6840 | acq->count = 0; |
| 6841 | acq->created = time_second; |
| 6842 | break; |
| 6843 | } |
| 6844 | } |
| 6845 | ACQ_UNLOCK(); |
| 6846 | if (acq == NULL) |
| 6847 | return (ESRCH); |
| 6848 | return (0); |
| 6849 | } |
| 6850 | /* |
| 6851 | * Mark ACQ entry as stale to remove it in key_flush_acq(). |
| 6852 | * Called after successful SADB_GETSPI message. |