tailcfg, control/controlclient: accept nil MapResponse.Node (mapver 18)

All MapResponse fields can not be omitted and are tagged "omitempty".

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-19 10:56:48 -07:00
committed by Brad Fitzpatrick
parent 97204fdc52
commit e9d24341e0
4 changed files with 72 additions and 17 deletions

View File

@@ -798,6 +798,10 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*netm
}
nm := sess.netmapForResponse(&resp)
if nm.SelfNode == nil {
c.logf("MapResponse lacked node")
return errors.New("MapResponse lacked node")
}
// Temporarily (2020-06-29) support removing all but
// discovery-supporting nodes during development, for