Fix detection of incoming localhost packets on Linux

This commit is contained in:
Daniel
2022-06-22 10:40:21 +02:00
parent 3a98b2cc05
commit 0dce13d18f

View File

@@ -141,6 +141,13 @@ func (pkt *packet) Drop() error {
}
func (pkt *packet) PermanentAccept() error {
// If the packet is localhost only, do not permanently accept the outgoing
// packet, as the packet mark will be copied to the connection mark, which
// will stick and it will bypass the incoming queue.
if !pkt.Info().Inbound && pkt.Info().Dst.IsLoopback() {
return pkt.Accept()
}
return pkt.mark(MarkAcceptAlways)
}