| 1537 | } |
| 1538 | |
| 1539 | static void |
| 1540 | pfsync_drop(struct pfsync_softc *sc) |
| 1541 | { |
| 1542 | struct pf_state *st, *next; |
| 1543 | struct pfsync_upd_req_item *ur; |
| 1544 | struct pfsync_bucket *b; |
| 1545 | int c, q; |
| 1546 | |
| 1547 | for (c = 0; c < pfsync_buckets; c++) { |
| 1548 | b = &sc->sc_buckets[c]; |
| 1549 | for (q = 0; q < PFSYNC_S_COUNT; q++) { |
| 1550 | if (TAILQ_EMPTY(&b->b_qs[q])) |
| 1551 | continue; |
| 1552 | |
| 1553 | TAILQ_FOREACH_SAFE(st, &b->b_qs[q], sync_list, next) { |
| 1554 | KASSERT(st->sync_state == q, |
| 1555 | ("%s: st->sync_state == q", |
| 1556 | __func__)); |
| 1557 | st->sync_state = PFSYNC_S_NONE; |
| 1558 | pf_release_state(st); |
| 1559 | } |
| 1560 | TAILQ_INIT(&b->b_qs[q]); |
| 1561 | } |
| 1562 | |
| 1563 | while ((ur = TAILQ_FIRST(&b->b_upd_req_list)) != NULL) { |
| 1564 | TAILQ_REMOVE(&b->b_upd_req_list, ur, ur_entry); |
| 1565 | free(ur, M_PFSYNC); |
| 1566 | } |
| 1567 | |
| 1568 | b->b_len = PFSYNC_MINPKT; |
| 1569 | b->b_plus = NULL; |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | static void |
| 1574 | pfsync_sendout(int schedswi, int c) |
no test coverage detected