mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-22 04:48:39 +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. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
fddf43f3d1
commit
a8cc519c70
@ -770,7 +770,8 @@ func (c *Client) Probe(ctx context.Context) (res ProbeResult, err error) {
|
||||
meta, err := parseUPnPDiscoResponse(buf[:n])
|
||||
if err != nil {
|
||||
metricUPnPParseErr.Add(1)
|
||||
c.logf("unrecognized UPnP discovery response; ignoring")
|
||||
c.logf("unrecognized UPnP discovery response; ignoring: %v", err)
|
||||
continue
|
||||
}
|
||||
metricUPnPOK.Add(1)
|
||||
c.logf("[v1] UPnP reply %+v, %q", meta, buf[:n])
|
||||
|
Loading…
x
Reference in New Issue
Block a user