-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Open
zdohnal
wants to merge
1
commit into
michaelrsweet:v1.4.x
Choose a base branch
from
zdohnal:mdns-registration-avahi
base: v1.4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
zdohnal
force-pushed
the
mdns-registration-avahi
branch
from
February 29, 2024 09:48
26ba2ee
to
a893937
Compare
michaelrsweet
requested changes
Mar 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my other comments. No to "reghost". Yes to fixing localhost/loopback advertising.
michaelrsweet
added
bug
Something isn't working
priority-medium
platform issue
Issue is specific to an OS or desktop
labels
Mar 1, 2024
zdohnal
force-pushed
the
mdns-registration-avahi
branch
4 times, most recently
from
March 14, 2024 08:14
a666fe9
to
0ac1c0d
Compare
zdohnal
force-pushed
the
mdns-registration-avahi
branch
from
March 15, 2024 09:22
2668376
to
78a5dbd
Compare
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
force-pushed
the
mdns-registration-avahi
branch
from
March 19, 2024 16:07
78a5dbd
to
3e88a44
Compare
michaelrsweet
requested changes
Jul 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments on the other PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. This can be prevented if the machine hostname is changed to localhost, but that's not desired on machines IIUC.The PR does the following:
reghost
, which is used for savinglisten-hostname
,papplSystemSetRegHostName()
andpapplSystemGetRegHostName()
- user can set the member to localhost or to the current hostnameThe result is that if reghost is set to localhost, the service is published on
.local
address, but resolved to loopback because CUPS uses DNS-SD names in URIs.