diff --git a/app/Classes/Protocol/DNS.php b/app/Classes/Protocol/DNS.php index 6bb6ca3..8a4b07d 100644 --- a/app/Classes/Protocol/DNS.php +++ b/app/Classes/Protocol/DNS.php @@ -12,6 +12,7 @@ use App\Models\{Address,Domain,Mailer}; /** * Respond to DNS queries and provide addresses to FTN nodes. + * http://ftsc.org/docs/fts-5004.001 * * This implementation doesnt support EDNS nor DNSSEC. * @@ -180,18 +181,23 @@ final class DNS extends BaseProtocol // If this is a SRV record query if ($this->query->type === self::DNS_TYPE_SRV) { + if ($labels->skip(1)->first() !== '_tcp') + return $this->reply(self::DNS_NAMEERR); + switch ($labels->first()) { case '_binkp': - if ($labels->skip(1)->first() !== '_tcp') - return $this->reply(self::DNS_NAMEERR); - - $labels->shift(2); $mailer = Mailer::where('name','BINKP')->singleOrFail(); break; + case '_ifcico': + $mailer = Mailer::where('name','EMSI')->singleOrFail(); + break; + default: return $this->reply(self::DNS_NAMEERR); } + + $labels->shift(2); } // First check that it is a query we can answer @@ -242,8 +248,8 @@ final class DNS extends BaseProtocol return $this->reply( self::DNS_NOERROR, [serialize([ - 0, - 0, + 0, // priority + 1, // weight $xx->pivot->port, $this->domain_split($ao->system->address), ]) => self::DNS_TYPE_SRV]); diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php index b5c1fc9..608de8b 100644 --- a/resources/views/about.blade.php +++ b/resources/views/about.blade.php @@ -76,9 +76,10 @@ FSC-0045, FSC-0048
  • Automatic delisting of idle nodes (to be implemented)
  • -
  • DNS server, to enable resolving of registered nodes using domain dns names - pN.fN.nN.zN.domain.ftn, or - pN.fN.nN.zN.[domain dns zone]
  • +
  • DNS server, to enable resolving of registered nodes using domain dns names FTS-5004 + with pN.fN.nN.zN.domain.ftn, or + pN.fN.nN.zN.[domain dns zone] + syntax, including TXT and CNAME records
  • Other things