mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-12 03:04:40 +00:00
net/portmapper: improve handling of UPnP parse errors
Without the continue, we might overwrite our current meta
with a zero meta.
Log the error, so that we can check for anything unexpected.
Change-Id: Ia0124e19b7df1191a7685aee949fd19336e41a76
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
(cherry picked from commit a8cc519c70
)
This commit is contained in:
parent
32210788a2
commit
71be839f03
@ -763,6 +763,7 @@ func (c *Client) Probe(ctx context.Context) (res ProbeResult, err error) {
|
|||||||
meta, err := parseUPnPDiscoResponse(buf[:n])
|
meta, err := parseUPnPDiscoResponse(buf[:n])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.logf("unrecognized UPnP discovery response; ignoring")
|
c.logf("unrecognized UPnP discovery response; ignoring")
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
c.logf("[v1] UPnP reply %+v, %q", meta, buf[:n])
|
c.logf("[v1] UPnP reply %+v, %q", meta, buf[:n])
|
||||||
res.UPnP = true
|
res.UPnP = true
|
||||||
|
Loading…
Reference in New Issue
Block a user