diff --git a/app/Classes/Dynamic/NodelistSegment.php b/app/Classes/Dynamic/NodelistSegment.php index 232d0c8..3dfcf03 100644 --- a/app/Classes/Dynamic/NodelistSegment.php +++ b/app/Classes/Dynamic/NodelistSegment.php @@ -59,7 +59,7 @@ class NodelistSegment extends Dynamic $result->push('CM'); if ($ao->system->address) { - $result->push(sprintf('INA:%s',$ao->system->address)); + $result->push(sprintf('INA:%s',our_address($ao->domain)->contains($ao->id) ? our_hostname($ao) : $ao->system->address)); if (($x=$ao->system->mailers->pluck('name')->search('BINKP')) !== FALSE) $result->push(sprintf('IBN%s',(($y=$ao->system->mailers->get($x)->pivot->port) !== 24554) ? ':'.$y : '')); diff --git a/app/helpers.php b/app/helpers.php index 54cfc0c..76fcfc7 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -100,7 +100,7 @@ function our_address(Domain|Address $o=NULL): Collection|Address|NULL $our = Cache::remember(sprintf('%d-akas',$so->system_id),60,function() use ($so) { $so->load([ 'system:id,name', - 'system.akas:addresses.id,addresses.zone_id,host_id,node_id,point_id,addresses.system_id,addresses.active,role', + 'system.akas:addresses.id,addresses.zone_id,region_id,host_id,node_id,point_id,addresses.system_id,addresses.active,role', 'system.akas.zone:id,domain_id,zone_id', 'system.akas.zone.domain:id,name', ]); @@ -150,6 +150,7 @@ function our_hostname(Address $o): string ->prepend(sprintf('z%d',$our->zone->zone_id)); break; + case Address::NODE_RC: case Address::NODE_NC: $domain = collect(explode('.',gethostname()))->forget(0) ->prepend(sprintf('z%d',$our->zone->zone_id))