SIGN IN SIGN UP

libn/d/overlay: fix secMap reference underflow

If removeEncryption() is called more times than setupEncryption() for
some remoteIP, a secMap entry for that address is created with a
reference count of -1. Make removeEncryption() a no-op for non-encrypted
addresses so len(d.secMap) is an accurate count of IPsec tunnels we have
programmed.

Signed-off-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
C
Cory Snider committed
02ce193f9f3d7dd2c0197a7fc7dc41eee220c847
Parent: db9f143
Committed by Sebastiaan van Stijn <github@gone.nl> on 9/30/2026, 7:09:18 PM