MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pfsync_drop

Function pfsync_drop

freebsd/netpfil/pf/if_pfsync.c:1539–1571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1537}
1538
1539static void
1540pfsync_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
1573static void
1574pfsync_sendout(int schedswi, int c)

Callers 2

pfsync_clone_destroyFunction · 0.85
pfsync_sendoutFunction · 0.85

Calls 2

pf_release_stateFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected