mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-24 01:26:39 +00:00
wgengine/netlog: include node OS in logged attributes (#17755)
Include the node's OS with network flow log information. Refactor the JSON-length computation to be a bit more precise. Updates tailscale/corp#33352 Fixes tailscale/corp#34030 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
@@ -190,6 +190,7 @@ func TestToNode(t *testing.T) {
|
||||
node: &tailcfg.Node{
|
||||
StableID: "n123456CNTL",
|
||||
Addresses: []netip.Prefix{prefix("100.1.2.3")},
|
||||
Hostinfo: (&tailcfg.Hostinfo{OS: "linux"}).View(),
|
||||
User: 12345,
|
||||
},
|
||||
user: &tailcfg.UserProfile{
|
||||
@@ -199,6 +200,7 @@ func TestToNode(t *testing.T) {
|
||||
want: netlogtype.Node{
|
||||
NodeID: "n123456CNTL",
|
||||
Addresses: []netip.Addr{addr("100.1.2.3")},
|
||||
OS: "linux",
|
||||
User: "user@domain",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user