Skip to content

Commit 2d6503f

Browse files
committed
fix: track received packets dropped by post filter
1 parent 7d90f07 commit 2d6503f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/tstun/wrap.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,11 @@ func (t *Wrapper) filterIn(buf []byte) filter.Response {
665665

666666
if t.PostFilterIn != nil {
667667
if res := t.PostFilterIn(p, t); res.IsDrop() {
668+
if res == filter.DropSilently {
669+
if t.stats.enabled.Load() {
670+
t.stats.UpdateRx(buf)
671+
}
672+
}
668673
return res
669674
}
670675
}

0 commit comments

Comments
 (0)