mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-04 15:35:38 +00:00
net/portmapper: make pcpCodeNotAuthorized log more descriptive
If PCP is present but disabled, turning it on might help
get direct connections.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
(cherry picked from commit de4c635e54
)
This commit is contained in:
parent
e7d5d90037
commit
b39592f68a
@ -115,6 +115,9 @@ func parsePCPMapResponse(resp []byte) (*pcpMapping, error) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("Invalid PCP common header")
|
return nil, fmt.Errorf("Invalid PCP common header")
|
||||||
}
|
}
|
||||||
|
if res.ResultCode == pcpCodeNotAuthorized {
|
||||||
|
return nil, fmt.Errorf("PCP is implemented but not enabled in the router")
|
||||||
|
}
|
||||||
if res.ResultCode != pcpCodeOK {
|
if res.ResultCode != pcpCodeOK {
|
||||||
return nil, fmt.Errorf("PCP response not ok, code %d", res.ResultCode)
|
return nil, fmt.Errorf("PCP response not ok, code %d", res.ResultCode)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user