Signed-off-by: Alejandro Mery <amery@jpi.io>
@ -86,7 +86,7 @@ func getRingZeroGatewayID(z *Zone) int {
firstNodeID = p.ID
}
if _, ok := p.getRingInfo(0); ok {
if p.IsGateway() {
gatewayID = p.ID
@ -58,6 +58,12 @@ func (m *Machine) getFilename(name string, args ...any) string {
return filepath.Join(s...)
// IsGateway tells if the Machine is a ring0 gateway
func (m *Machine) IsGateway() bool {
_, ok := m.getRingInfo(0)
return ok
func (m *Machine) getPeerByName(name string) (*Machine, bool) {
return m.zone.zones.GetMachineByName(name)