-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dnssd.c: Enable service registration on loopback
In case users would like to prevent sharing services from printer applications to local network, restrict it to localhost and let CUPS do the sharing. This can be done by setting `listen-hostname` in PAPPL API - this prevents accessing the public addresses, but the service is still published on those public addresses. The PR does the following: - update system hostname internally in `papplAddListeners()` - dnssd functions will check system hostname and if it is localhost, it will use loopback index - in case of Avahi it passes NULL as hostname to let Avahi decide what hostname to use (in case of hostname conflicts) The result is that if system hostname is set to localhost internally, the service is published on `.local` address, but resolved to loopback because CUPS uses DNS-SD names in URIs.
- Loading branch information
Showing
4 changed files
with
60 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters