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

Fix issue with detection whether to use ipv6 or ipv4 #498

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hrzlgnm
Copy link
Contributor

@hrzlgnm hrzlgnm commented Sep 25, 2024

The issue was occurring while checking whether the provider name contained
"ipv6" as an indication for whether to use IPv4 or IPv4. The check
confused a definition like "ipv4@ipv64.net" to use IPv6 due to having
"ipv6" in the name.

To address the issue we changed the check to whether the prefix of
the provider name is "ipv6".

While doing so, we factored out this check into a own function taking
a ddns_info_t * struct as an argument.

@hrzlgnm
Copy link
Contributor Author

hrzlgnm commented Sep 26, 2024

Tested the changes in my setup with the workaround removed successfully.

Got confused by the log message while running in a locally built docker:

inadyn-1 | inadyn[1]: Updating IPv6 cache for ipv4@ipv64.net which I fixed with 4ea7896

The issue was occurring while checking whether the provider name contained
"ipv6" as an indication for whether to use IPv4 or IPv4. The check
confused a definition like "ipv4@ipv64.net" to use IPv6 due to having
"ipv6" in the name.

To address the issue we changed the check to whether the prefix of
the provider name is "ipv6".

While doing so, we factored out this check into a own function taking
a ddns_info_* struct as an argument.
@hrzlgnm hrzlgnm force-pushed the 497-fix-issues-with-checking-whether-to-use-ivp6 branch from 773c795 to 28d875c Compare September 27, 2024 17:02
The original check, checked whether the alias name contained the
substring "v6". This lead to confusing logging messages for providers
having "v6" in their name. For example in definitions
like "ipv4@ipv64.net" or "ipv4@dynv6.com".
@hrzlgnm hrzlgnm force-pushed the 497-fix-issues-with-checking-whether-to-use-ivp6 branch from 28d875c to 4ea7896 Compare September 27, 2024 17:03
@hrzlgnm
Copy link
Contributor Author

hrzlgnm commented Sep 27, 2024

@troglobit, if you want the second commit in a separate issue with a separate PR let me know. Both topics were related, so I thought it made sense to squash those issues with one PR.

@hrzlgnm
Copy link
Contributor Author

hrzlgnm commented Sep 27, 2024

I'm currently using this branch to build a docker image which i then use in a docker-compose setup, and i can use ipv64.net and the dynv6.com providers without issues so far.

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.

1 participant