mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 07:57:34 +00:00
Use node_key to find peers
This commit is contained in:
parent
0db7fc5ab7
commit
c0fe1abf4d
@ -244,8 +244,8 @@ func (h *Headscale) ListPeers(machine *Machine) (Machines, error) {
|
|||||||
Msg("Finding direct peers")
|
Msg("Finding direct peers")
|
||||||
|
|
||||||
machines := Machines{}
|
machines := Machines{}
|
||||||
if err := h.db.Preload("AuthKey").Preload("AuthKey.Namespace").Preload("Namespace").Where("machine_key <> ?",
|
if err := h.db.Preload("AuthKey").Preload("AuthKey.Namespace").Preload("Namespace").Where("node_key <> ?",
|
||||||
machine.MachineKey).Find(&machines).Error; err != nil {
|
machine.NodeKey).Find(&machines).Error; err != nil {
|
||||||
log.Error().Err(err).Msg("Error accessing db")
|
log.Error().Err(err).Msg("Error accessing db")
|
||||||
|
|
||||||
return Machines{}, err
|
return Machines{}, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user