Skip to content

Commit 835ffee

Browse files
committed
fix connstats in filter
1 parent 64798ec commit 835ffee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/tstun/wrap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@ func (t *Wrapper) filterIn(p *packet.Parsed) filter.Response {
717717
if t.PostFilterIn != nil {
718718
if res := t.PostFilterIn(p, t); res.IsDrop() {
719719
if res == filter.DropSilently {
720-
if t.stats.enabled.Load() {
721-
t.stats.UpdateRx(buf)
720+
if stats := t.stats.Load(); stats != nil {
721+
stats.UpdateRxVirtual(p.Buffer())
722722
}
723723
}
724724
return res

0 commit comments

Comments
 (0)