Skip to content

Commit 97a7019

Browse files
committed
Fix UDP outbound
1 parent 485ce62 commit 97a7019

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

net/tstun/wrap.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,14 @@ func (t *Wrapper) injectedRead(res tunInjectedRead, outBuffs [][]byte, sizes []i
10521052
defer parsedPacketPool.Put(p)
10531053
p.Decode(pkt)
10541054

1055+
if !t.disableFilter {
1056+
response, _ := t.filterPacketOutboundToWireGuard(p, pc, nil)
1057+
if response != filter.Accept {
1058+
metricPacketOutDrop.Add(1)
1059+
return 0, nil
1060+
}
1061+
}
1062+
10551063
invertGSOChecksum(pkt, gso)
10561064
pc.snat(p)
10571065
invertGSOChecksum(pkt, gso)

0 commit comments

Comments
 (0)