mirror of
https://github.com/safing/portmaster
synced 2025-09-04 03:29:12 +00:00
Fix not applying permanent verdicts to ICMP
This commit is contained in:
parent
154b0454fc
commit
5550c46c5c
1 changed files with 8 additions and 4 deletions
|
@ -559,10 +559,14 @@ func issueVerdict(conn *network.Connection, pkt packet.Packet, verdict network.V
|
||||||
|
|
||||||
// Enable permanent verdict.
|
// Enable permanent verdict.
|
||||||
if allowPermanent && !conn.VerdictPermanent {
|
if allowPermanent && !conn.VerdictPermanent {
|
||||||
// Only enable if enabled in config and it is not ICMP.
|
switch {
|
||||||
// ICMP is handled differently based on payload, so we cannot use persistent verdicts.
|
case !permanentVerdicts():
|
||||||
conn.VerdictPermanent = permanentVerdicts() && !reference.IsICMP(conn.Entity.Protocol)
|
// Permanent verdicts are disabled by configuration.
|
||||||
if conn.VerdictPermanent {
|
case conn.Entity != nil && reference.IsICMP(conn.Entity.Protocol):
|
||||||
|
case pkt != nil && reference.IsICMP(uint8(pkt.Info().Protocol)):
|
||||||
|
// ICMP is handled differently based on payload, so we cannot use persistent verdicts.
|
||||||
|
default:
|
||||||
|
conn.VerdictPermanent = true
|
||||||
conn.SaveWhenFinished()
|
conn.SaveWhenFinished()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue