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

dnssd.c: Enable service registration on loopback #345

Closed

Commits on Mar 19, 2024

  1. 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.
    zdohnal committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    3e88a44 View commit details
    Browse the repository at this point in the history