tailcfg: add SetDNSResponse

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali 2022-03-07 12:37:06 -08:00 committed by Maisem Ali
parent 0f31a0fc76
commit da1821197a
2 changed files with 4 additions and 1 deletions

View File

@ -1298,7 +1298,7 @@ func (c *Direct) SetDNS(ctx context.Context, req *tailcfg.SetDNSRequest) (err er
msg, _ := ioutil.ReadAll(res.Body)
return fmt.Errorf("set-dns response: %v, %.200s", res.Status, strings.TrimSpace(string(msg)))
}
var setDNSRes struct{} // no fields yet
var setDNSRes tailcfg.SetDNSResponse
if err := decode(res, &setDNSRes, serverKey, machinePrivKey); err != nil {
c.logf("error decoding SetDNSResponse with server key %s and machine key %s: %v", serverKey, machinePrivKey.Public(), err)
return fmt.Errorf("set-dns-response: %v", err)

View File

@ -1534,6 +1534,9 @@ type SetDNSRequest struct {
Value string
}
// SetDNSResponse is the response to a SetDNSRequest.
type SetDNSResponse struct{}
// SSHPolicy is the policy for how to handle incoming SSH connections
// over Tailscale.
type SSHPolicy struct {