-
Notifications
You must be signed in to change notification settings - Fork 229
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
Support "wide-area" DNS-SD lookups #319
Comments
Hi @dwagenk , thank you for bringing this up! Supporting unicast DNS-SD sounds neat, any PR related to it is welcome :) . It would be a good feature in addition to printer profiles (which will solely use IPP protocol). |
Hello @zdohnal ,
Looks like the avahi queries are similar to what I found in the dnssd backend. The lookup in Lines 3700 to 3729 in 28c6bb1
avahi_domain_browser_new ) and then executed for each of the found domains.
Actually I think additional domains are not needed in cups-specific configuration. Avahi already has mechanisms for specifying additional domains and picks up the ones provided via DHCP (Option 15 "Domain", Option 119 "DNS domain search list"). |
Also for reference: Systems using mDNSResponder should already have the desired behaviour of scanning both multicast and unicast DNS-SD due to the
according to apple/cups#5071 (comment) |
Also, to comment as someone who is more on a end user level: |
@MadByteDE depends on circumstances - there was a bug in CUPS 2.4.1 which was preventing using .local when you were about to use driverless queue - this should be fixed in 2.4.2, although there is a small delay between the queue is created and really working as driverless (see #347). So the reason why you couldn't use .local address could be that bug in CUPS. |
Adding links from #411, which looks like duplicate of this issue - dns-sd pages , dns-sd rfc. |
Needs testing, but first cut is here: [master bed9057] Initial support for multiple DNS-SD domains and Avahi. |
Applied some additional fixes... |
Hello!
I'm stuck during setup of printer discovery via unicast DNS-SD. I think this is termed "Wide Area Bonjour" in some contexts. I assumed cups would query avahi for print services on the network regardless whether they are announced via unicast DNS-SD or multicast DNS-SD. But cups only finds the multicast DNS-SD (
.local
) printers, while e.g. the avahi-discover gui tool lists the.local
domain as well as the services from configured browsing domains.I think cups should also query unicast DNS-SD for all configured browsing domains or at least the default browsing domain. This would allow network admins to configure printers in the domain via the DNS server without relying on mDNS (which doesn't cross subnets).
From the avahi docs:
For the default search domain I'd interpret this as "show it". For additional search domains It's a little unclear whether they should be shown or ommitted. I think I'd default to showing them as well.
The dnssd backend (using avahi) code passes
domain=NULL
to theavahi_service_browser_new
function e.g. here which queries only the multicast.local
(or whatever is configured inavahi-daemon.conf
asdomain-name
) domain.The service query would need to be repeated for all domains returned by the
avahi_domain_browser_new
function (avahi docs).I tried discovering printers by running
/usr/lib/cups/backend/dnssd
standalone on different cups versions and linux distros (NixOS: cups 2.3.3, also on up to date ManjaroARM and Ubuntu 20.04, but I don't have them at hand right now to look at the cups version).I didn't check how the other libraries used by the dnssd backend handle this.
Let me know if I you need any more information on this. I could also prepare a PR sometime in the coming weeks.
The text was updated successfully, but these errors were encountered: