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

Fixes #224: Added ipv6 support to openwisp-get-address #225

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

Bartosz-lab
Copy link
Contributor

@Bartosz-lab Bartosz-lab commented Oct 19, 2024

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Fixes #224.

Description of Changes

  • Added support for getting the IPv6 address if the IPv4 address is not found in openwisp-get-address.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I have one doubt, what's the point of the --prefer-ipv6 flag if it's not used in the rest of the code?

@Bartosz-lab
Copy link
Contributor Author

Currently, the --prefer-ipv6 flag is not used anywhere in the code, but in the future, we may introduce a configuration option that would allow users to choose this preference.
However, if we decide not to introduce this option, I will remove the flag.

@nemesifier
Copy link
Member

Currently, the --prefer-ipv6 flag is not used anywhere in the code, but in the future, we may introduce a configuration option that would allow users to choose this preference. However, if we decide not to introduce this option, I will remove the flag.

As a general rule we add only code which is used. OpenWISP has quite a good number of modules which sums up as many lines of code, maintained by a very small group of people, so we need to make sure to add only what we really need. The problem is not just adding new lines of code but maintaining them over time.

@Bartosz-lab
Copy link
Contributor Author

I have made the modifications to include only the necessary code.

@nemesifier
Copy link
Member

Thanks @Bartosz-lab 🙏

@nemesifier nemesifier merged commit c7d973b into openwisp:master Oct 23, 2024
1 of 2 checks passed
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.

[bug] openwisp-get-address not work with IPv6 only interface
2 participants