* Mark ACQ entry as stale to remove it in key_flush_acq(). * Called after successful SADB_GETSPI message. */
| 6852 | * Called after successful SADB_GETSPI message. |
| 6853 | */ |
| 6854 | static int |
| 6855 | key_acqdone(const struct secasindex *saidx, uint32_t seq) |
| 6856 | { |
| 6857 | struct secacq *acq; |
| 6858 | |
| 6859 | ACQ_LOCK(); |
| 6860 | LIST_FOREACH(acq, ACQSEQHASH_HASH(seq), seqhash) { |
| 6861 | if (acq->seq == seq) |
| 6862 | break; |
| 6863 | } |
| 6864 | if (acq != NULL) { |
| 6865 | if (key_cmpsaidx(&acq->saidx, saidx, CMP_EXACTLY) == 0) { |
| 6866 | ipseclog((LOG_DEBUG, |
| 6867 | "%s: Mismatched saidx for ACQ %u\n", __func__, seq)); |
| 6868 | acq = NULL; |
| 6869 | } else { |
| 6870 | acq->created = 0; |
| 6871 | } |
| 6872 | } else { |
| 6873 | ipseclog((LOG_DEBUG, |
| 6874 | "%s: ACQ %u is not found.\n", __func__, seq)); |
| 6875 | } |
| 6876 | ACQ_UNLOCK(); |
| 6877 | if (acq == NULL) |
| 6878 | return (ESRCH); |
| 6879 | return (0); |
| 6880 | } |
| 6881 | |
| 6882 | static struct secspacq * |
| 6883 | key_newspacq(struct secpolicyindex *spidx) |
no test coverage detected