Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The examples produce resource records that don't comply with RFC6763 #80

Open
evverx opened this issue Jul 20, 2024 · 1 comment
Open

Comments

@evverx
Copy link

evverx commented Jul 20, 2024

The first two examples at https://github.com/troglobit/mdnsd?tab=readme-ov-file#service-records come with

target ftp.luthien.local

and it leads to PTR resource records like

        _ftp._tcp.local: type PTR, class IN, ftp.luthien.local
            Name: _ftp._tcp.local
            Type: PTR (12) (domain name PoinTeR)
            .000 0000 0000 0001 = Class: IN (0x0001)
            0... .... .... .... = Cache flush: False
            Time to live: 120 (2 minutes)
            Data length: 14
            Domain Name: ftp.luthien.local

where _ftp._tcp.local points to ftp.luthien.local.

The problem is that avahi-browse (or any other mDNS browser) can't follow those PTR resource records so those services can't be discovered using those tools. It's still possible to resolve the services directly since their SRV and TXT resource records are advertised too but there is no link between _ftp._tcp.local and Troglobit FTP Server._ftp._tcp.local anywhere.

According to https://datatracker.ietf.org/doc/html/rfc6763#section-4.1

   The result of this PTR lookup for the name "<Service>.<Domain>" is a
   set of zero or more PTR records giving Service Instance Names of the
   form:

      Service Instance Name = <Instance> . <Service> . <Domain>

where <Service> should follow https://datatracker.ietf.org/doc/html/rfc6763#section-7

   The <Service> portion of the Service Instance Name consists of a pair
   of DNS labels, following the convention already established for SRV
   records [RFC2782].  The first label of the pair is an underscore
   character followed by the Service Name [RFC6335].  The Service Name
   identifies what the service does and what application protocol it
   uses to do it.  The second label is either "_tcp" (for application
   protocols that run over TCP) or "_udp" (for all others).
@evverx
Copy link
Author

evverx commented Jul 20, 2024

I'm not sure what to do though. It makes it possible to test things like avahi/avahi@93b1436 so from that perspective I think it's great that it's possible to send PTR RRs like that. I'm not sure it should be included in the examples though. It could be that they are copied verbatim and end up being advertised by various devices like for example avahi/avahi#251. Those avahi bugs were fixed so it isn't that bad anymore but still.

Looking at

.It Cm target Ar URL
URL to announce as canonical for this service.

it seems that targets should go to SRV resource records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant