-
Notifications
You must be signed in to change notification settings - Fork 457
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
Controlling the contents of DNS-SD SRV records #5071
Comments
At least with mDNSResponder, the default (NULL) registration should cover both the .local and the fully-qualified domain name for the system (or at least that's how it works on the Mac). But will consider including this in a future release of CUPS to override the default... |
At least with mDNSResponder, the default (NULL) registration should cover both the .local and the fully-qualified domain name for the system (or at least that's how it works on the Mac).
I'm not sure what exactly you mean by ``cover''. The point is the contents of the resulting SRV RRs.
Without the modification, the SRV RRs emitted bs mdnsd on CUPS' behalf refer to <servername>.local, like (according to dns-sd -Z _ipp._tcp) in:
Testdrucker\032@\032cupstest-ea\.math\.uni-bonn\.de._ipp._tcp SRV 0 0 631 trave.local.
But trave.local. gets resolved by mDNS and I have limited control over the result.
With the modification (to cupsd and cupsd.conf), I can make them refer to a unicast-DNS-resolvable name, as in:
Testdrucker\032@\032cupstest-ea\.math\.uni-bonn\.de._ipp._tcp SRV 0 0 631 cupstest-ea.math.uni-bonn.de.
Then I have full control over what cupstest-ea.math.uni-bonn.de resolves to depending on the client's DNS view.
But will consider including this in a future release of CUPS to override the default...
Thanks.
|
OK, looking at the code it appears we already have a hostname for DNS-SD in the code, we just aren't using it for the service registrations. And if the mDNSResponder/Avahi-level hostname hasn't been set (just defaulting to something.local) we use the ServerName value. So I think just passing DNSSDHostName for our registration will Do The Right Thing. |
And if the mDNSResponder/Avahi-level hostname hasn't been set (just defaulting to something.local) we use the ServerName value.
The problem is that host_fqdn is set to the return value of avahi_client_get_host_name_fqdn(), which I can't control.
That value will be trave.math.uni-bonn.de, while what I want to go into the SRV records is cups-ea.math.uni-bonn.de. So I need something used at a higher priority than host_fqdn.
|
I actually think you can configure the FQDN for Avahi in the avahi.conf file... Need to look a bit closer at that... mDNSResponder likewise has configuration options to override the default .local hostname... |
I actually think you can configure the FQDN for Avahi in the avahi.conf file
But I may want other Avahi customers use different names.
The point is the CUPS process always using cups-ea.math.uni-bonn.de no matter what server it runs on.
|
Add support for DNSSDHostName configuration directive (Issue #5071)
Thanks!
+ { "DNSSDHostName", &DNSSDSubTypes, CUPSD_VARTYPE_STRING },
That’s a copy-paste-typo, no?
|
In an office environment, it may be undesirable for the DNS-SD SRV records to refer to the .local (mDNS) name of the CUPS server and preferable to hand out a unicast-DNS-resolvable name instead.
We, for instance, resolve cups.math.uni-bonn.de to different addresses (of the same server) for different sets of clients; we also like to control whether that name resolves to an IPv6 address for a given client and suppress special-purpose alias addresses of the server (on which CUPS doesn't listen).
The attached patch tries to address that by introducing a BrowseDNSSDSrvName option.
The patch works (on NetBSD) with mDNSResponder; the Avahi part hasn't even been compile-tested.
dnssd-srv-name.txt
The text was updated successfully, but these errors were encountered: