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

RNCNetInfo using ipv4-specific calls #300

Closed
szwen opened this issue Feb 12, 2020 · 2 comments
Closed

RNCNetInfo using ipv4-specific calls #300

szwen opened this issue Feb 12, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers iOS

Comments

@szwen
Copy link

szwen commented Feb 12, 2020

I've seen that RCNetInfo is using the ipv4-specific call 'inet_ntoa' in 'subnet' and 'ipAddress' methods. Wouldn't this make the library unusable for ipv6 network connections? Moreover, wouldn't this make the App Store reject an app containing this library? https://developer.apple.com/support/ipv6/

Wouldn't inet_ntop be a better choice?

@szwen szwen added the question Further information is requested label Feb 12, 2020
@matt-oakes
Copy link
Collaborator

👋 Thanks for making me aware of this. I will keep this open as a TODO, but if you have time then a pull request (even a part complete one) would be very much appreciated.

@matt-oakes matt-oakes added enhancement New feature or request good first issue Good for newcomers iOS and removed question Further information is requested labels Feb 12, 2020
greenantdotcom added a commit to greenantdotcom/react-native-netinfo that referenced this issue Nov 22, 2020
… prevent IPv4-only warnings

In `ios/RNCNetInfo.m`, refactored `inet_ntoa` (which causes warnings around Apple AppStore requirements for dual-stack networking code) to instead use `inet_ntop` which itself supports both IPv4 and IPv6.

For now, have _not_ added explicit IPv6 (`AF_INET6`) support pending discussion with the community.
greenantdotcom added a commit to greenantdotcom/react-native-netinfo that referenced this issue Nov 22, 2020
… prevent IPv4-only warnings

In `ios/RNCNetInfo.m`, refactored `inet_ntoa` (which causes warnings around Apple AppStore requirements for dual-stack networking code) to instead use `inet_ntop` which itself supports both IPv4 and IPv6.

For now, have _not_ added explicit IPv6 (`AF_INET6`) support pending discussion with the community.
greenantdotcom added a commit to greenantdotcom/react-native-netinfo that referenced this issue Nov 22, 2020
… prevent IPv4-only warnings

In `ios/RNCNetInfo.m`, refactored `inet_ntoa` (which causes warnings around Apple AppStore requirements for dual-stack networking code) to instead use `inet_ntop` which itself supports both IPv4 and IPv6.

For now, have _not_ added explicit IPv6 (`AF_INET6`) support pending discussion with the community.
greenantdotcom added a commit to greenantdotcom/react-native-netinfo that referenced this issue Nov 22, 2020
…y warnings

For [react-native-netinfo#300](react-native-netinfo#300

Refactored `ios/RNCNetInfo.m` from `inet_ntoa` (which causes warnings around Apple AppStore requirements for dual-stack networking code) to `inet_ntop` which itself supports both IPv4 and IPv6.

For now, have _not_ added explicit IPv6 (`AF_INET6`) support pending discussion with the community.
greenantdotcom added a commit to greenantdotcom/react-native-netinfo that referenced this issue Nov 22, 2020
For [react-native-netinfo#300](react-native-netinfo#300

Refactored `ios/RNCNetInfo.m` from `inet_ntoa` (which causes warnings around Apple AppStore requirements for dual-stack networking code) to `inet_ntop` which itself supports both IPv4 and IPv6.

For now, have _not_ added explicit IPv6 (`AF_INET6`) support pending discussion with the community.
@greenantdotcom
Copy link
Contributor

@matt-oakes @szwen If you didn't see, I have submitted a PR for this - #431 - which fixes this specifically but also lays out a roadmap around what IPv6 support may look like and how it'd have to work. Please take a look, and let me know if this is to everyone's liking/expectations for the issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers iOS
Projects
None yet
Development

No branches or pull requests

3 participants