Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111846610
D27440.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27440.diff
View Options
Index: head/sys/netpfil/pf/pf_table.c
===================================================================
--- head/sys/netpfil/pf/pf_table.c
+++ head/sys/netpfil/pf/pf_table.c
@@ -1641,6 +1641,7 @@
static void
pfr_commit_ktable(struct pfr_ktable *kt, long tzero)
{
+ counter_u64_t *pkc, *qkc;
struct pfr_ktable *shadow = kt->pfrkt_shadow;
int nflags;
@@ -1662,14 +1663,17 @@
SLIST_INIT(&delq);
SLIST_INIT(&garbageq);
pfr_clean_node_mask(shadow, &addrq);
- for (p = SLIST_FIRST(&addrq); p != NULL; p = next) {
- next = SLIST_NEXT(p, pfrke_workq); /* XXX */
+ SLIST_FOREACH_SAFE(p, &addrq, pfrke_workq, next) {
pfr_copyout_addr(&ad, p);
q = pfr_lookup_addr(kt, &ad, 1);
if (q != NULL) {
if (q->pfrke_not != p->pfrke_not)
SLIST_INSERT_HEAD(&changeq, q,
pfrke_workq);
+ pkc = &p->pfrke_counters.pfrkc_counters;
+ qkc = &q->pfrke_counters.pfrkc_counters;
+ if ((*pkc == NULL) != (*qkc == NULL))
+ SWAP(counter_u64_t, *pkc, *qkc);
q->pfrke_mark = 1;
SLIST_INSERT_HEAD(&garbageq, p, pfrke_workq);
} else {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 5:45 AM (12 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17080425
Default Alt Text
D27440.diff (1 KB)
Attached To
Mode
D27440: pf: Fix table entry counter toggling
Attached
Detach File
Event Timeline
Log In to Comment