net/portmapper: Stop replacing the internal port with the upnp external port (#18349)

net/portmapper: Stop replacing the internal port with the upnp external port

This causes the UPnP mapping to break in the next recreation of the
mapping.

Fixes #18348

Signed-off-by: Eduardo Sorribas <eduardo@sorribas.org>
actions/licenses
Eduardo Sorribas 1 day ago committed by GitHub
parent 3840183be9
commit 7676030355
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -574,7 +574,7 @@ func (c *Client) getUPnPPortMapping(
c.mu.Lock()
defer c.mu.Unlock()
c.mapping = upnp
c.localPort = externalAddrPort.Port()
c.localPort = internal.Port()
return upnp.external, true
}

Loading…
Cancel
Save