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

Small documentation corrections #945

Merged
merged 7 commits into from
Dec 9, 2021

Conversation

jwillikers
Copy link
Contributor

@jwillikers jwillikers commented Nov 28, 2021

This PR fixes small typos in the documentation and adds missing build dependencies necessary for building on Fedora.
This PR also adds the host option to the Mopidy configuration examples when using the TCP source.
Without host=127.0.0.1 I wasn't able to get the examples to work.

Some small improvements were made to the ALSA backend configuration examples.
The ALSA loopback device is now referred to by name instead of index since the index is subject to change.


Pull Request Checklist

  • Contributions must be licensed under the GPL-3.0 License

  • This project loosely follows the Google C++ Style Guide

  • For better compatibility with embedded toolchains, the used C++ standard should be limited to C++14

  • Code should be formatted by running make reformat

  • Branch from the develop branch and ensure it is up to date with the current develop branch before submitting your pull request. If it doesn't merge cleanly with develop, you may be asked to resolve the conflicts. Pull requests to master will be closed.

  • Commits should be as small as possible while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests).

  • Pull requests must not contain compiled sources (already set by the default .gitignore) or binary files

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests. If tested manually, provide information about the test scope in the PR description (e.g. “Test passed: Upgrade version from 0.42 to 0.42.23.”).

  • Create Work In Progress [WIP] pull requests only if you need clarification or an explicit review before you can continue your work item.

  • If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment, or you can ask for a review by contacting us via email.

  • Post review:

    • If a review requires you to change your commit(s), please test the changes again.
    • Amend the affected commit(s) and force push onto your branch.
    • Set respective comments in your GitHub review to resolved.
    • Create a general PR comment to notify the reviewers that your amendments are ready for another round of review.

@kingosticks
Copy link
Contributor

Surprised you need the host argument as the default is "localhost".

@jwillikers
Copy link
Contributor Author

jwillikers commented Nov 28, 2021

Surprised you need the host argument as the default is "localhost".

Me too, but apparently I'm not the only one: #511 (comment)
Does localhost use IPv6 instead of IPv4 in GStreamer or something?

@jwillikers jwillikers force-pushed the add-missing-build-deps branch from 8f247e8 to 04c4872 Compare November 28, 2021 16:36
This will work whatever index the loopback device happens to have.
@jwillikers jwillikers force-pushed the add-missing-build-deps branch from 04c4872 to 653f473 Compare November 28, 2021 16:39
@badaix badaix merged commit 607f1db into badaix:develop Dec 9, 2021
@badaix
Copy link
Owner

badaix commented Dec 9, 2021

Thanks!

@kingosticks
Copy link
Contributor

Does localhost use IPv6 instead of IPv4 in GStreamer or something?

Sorry for the slow response. I don't think this is specific to GStreamer (which will surely be using the system resolver). Seems that on dual-stack systems, IPv6 is preferred over v4 and since localhost resolves to both 127.0.01 and ::1, the latter wins. I can see the same thing when I ping localhost on my machine.

Presumably listening/connecting on ::1 is fine providing that matches the other side. But if snapserver.conf is explicitly using 127.0.0.1 (as per the docs, does it even support hostnames?) then Mopidy using ::1isn't going to work. So I think this all makes sense and being explicit on both sides is the correct answer.

@badaix
Copy link
Owner

badaix commented Dec 17, 2021

Just checked the code: the tcp stream doesn't do any host name resolution. Both, IPv4 and IPv6 should work, but no name resolution happens. I will create a feature request for this.

btw: on my Linux Mint machine I have localhost for IPv4 and ip6-localhost for IPv6:

 more /etc/hosts
127.0.0.1	localhost
127.0.1.1	Laptop

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now my IPs are publicly available in the internet, hope I will not get hacked.
It's Friday :)

@kingosticks
Copy link
Contributor

btw: on my Linux Mint machine I have localhost for IPv4 and ip6-localhost for IPv6:

I have the same for my Ubuntu 20.04 machine. But my Fedora 33 and Raspbian systems have something more futuristic:

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

I'm now going to turn my machines off to avoid the hacker onslaught.

@badaix
Copy link
Owner

badaix commented Dec 17, 2021

First the hacker has to resolve the IP conflict between your and my IP addresses

@jwillikers
Copy link
Contributor Author

Fedora 35:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants