mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-02 06:22:24 +00:00
tstest/integration/testcontrol: sort peers in map response
This is part of the control protocol. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
cd426eaf4c
commit
fcca374fa7
@ -661,6 +661,9 @@ func (s *Server) MapResponse(req *tailcfg.MapRequest) (res *tailcfg.MapResponse,
|
|||||||
res.Peers = append(res.Peers, p)
|
res.Peers = append(res.Peers, p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sort.Slice(res.Peers, func(i, j int) bool {
|
||||||
|
return res.Peers[i].ID < res.Peers[j].ID
|
||||||
|
})
|
||||||
|
|
||||||
v4Prefix := netaddr.IPPrefixFrom(netaddr.IPv4(100, 64, uint8(tailcfg.NodeID(user.ID)>>8), uint8(tailcfg.NodeID(user.ID))), 32)
|
v4Prefix := netaddr.IPPrefixFrom(netaddr.IPv4(100, 64, uint8(tailcfg.NodeID(user.ID)>>8), uint8(tailcfg.NodeID(user.ID))), 32)
|
||||||
v6Prefix := netaddr.IPPrefixFrom(tsaddr.Tailscale4To6(v4Prefix.IP()), 128)
|
v6Prefix := netaddr.IPPrefixFrom(tsaddr.Tailscale4To6(v4Prefix.IP()), 128)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user