From 2e50518066ce379f7b1e55c9a2814523af10c92b Mon Sep 17 00:00:00 2001 From: JackDoan Date: Wed, 4 Mar 2026 13:08:15 -0600 Subject: [PATCH] new error --- firewall.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firewall.go b/firewall.go index 6146a058..dea7a9c8 100644 --- a/firewall.go +++ b/firewall.go @@ -25,6 +25,7 @@ import ( var ErrCannotSNAT = errors.New("cannot SNAT this packet") var ErrSNATIdentityMismatch = errors.New("refusing to SNAT for mismatched host") +var ErrSNATAddressCollision = errors.New("refusing to accept an incoming packet with my SNAT address") const ipv4SourcePosition = 12 const ipv4DestinationPosition = 16 @@ -522,7 +523,7 @@ func (f *Firewall) applySnat(data []byte, fp *firewall.Packet, c *conn, hostinfo return ErrCannotSNAT } if f.snatAddr == fp.LocalAddr { //a packet that came from UDP (incoming) should never ever have our snat address on it - return ErrSNATIdentityMismatch + return ErrSNATAddressCollision } if c.snat.Valid() { //old flow: make sure it came from the right place