From 562a78a981c06fdc55fd75fbfe16fa7b1055b78c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 1 Apr 2025 13:38:54 +0200 Subject: [PATCH] p2p/nat: return error from internalAddress --- p2p/nat/natupnp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index f3d55e0f0a..1014dc69d2 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -82,7 +82,7 @@ func (n *upnp) ExternalIP() (addr net.IP, err error) { func (n *upnp) AddMapping(protocol string, extport, intport int, desc string, lifetime time.Duration) (uint16, error) { ip, err := n.internalAddress() if err != nil { - return 0, nil // TODO: Shouldn't we return the error? + return 0, err } protocol = strings.ToUpper(protocol) lifetimeS := uint32(lifetime / time.Second)