tailcfg, ipn/ipnlocal: add Hostinfo.SSH_HostKeys, send when SSH enabled

(The name SSH_HostKeys is bad but SSHHostKeys is worse.)

Updates #3802

Change-Id: I2a889019c9e8b065b668dd58140db4fcab868a91
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-02-17 15:00:41 -08:00
committed by Brad Fitzpatrick
parent 4609096271
commit bb93e29d5c
7 changed files with 52 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ func TestHostinfoEqual(t *testing.T) {
"ShieldsUp", "ShareeNode",
"GoArch",
"RoutableIPs", "RequestTags",
"Services", "NetInfo",
"Services", "NetInfo", "SSH_HostKeys",
}
if have := fieldsOf(reflect.TypeOf(Hostinfo{})); !reflect.DeepEqual(have, hiHandles) {
t.Errorf("Hostinfo.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
@@ -181,6 +181,11 @@ func TestHostinfoEqual(t *testing.T) {
&Hostinfo{},
false,
},
{
&Hostinfo{SSH_HostKeys: []string{"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO.... root@bar"}},
&Hostinfo{},
false,
},
}
for i, tt := range tests {
got := tt.a.Equal(tt.b)