[Needs testing] Better handling for IPv6 - #7
Open
anthonyryan1 wants to merge 1 commit into
Open
Conversation
This is a hypothetical fix for projg2#6 with the caveat that I still don't have a UPnP IGD:2 router, so while I've written what I *think* the UPNP_AddPinhole and UPNP_DeletePinhole code should look like. That code path is entirely hopeful and has not actually been tested at all. My hope is that by opening a PR, people with dual stack home networks can report here if they're properly downgrading to IPv4 address on unsupported routers, and an IPv6 address (with a working pinhole) on UPnP IGD:2 routers. With enough confirmations, hopefully we can work out any bugs in the code path I wasn't able to test properly. The part I have successfully tested is that we're now printing the IPv4 address on dual-stack networks, where we fail to open a UPnP pinhole. That fixes my personal usage of pshs. But given my brand new router still doesn't support pinhole. I'm guessing it may be a long time before any consumer routers actually implement this functionality and we can test the IPv6 portion of this PR. Suggestions are welcome of course. C++ isn't one of my primary languages, so please let me know about any egregious mistakes or cases where things could be done better.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a hypothetical fix for #6 with the caveat that I still don't have a UPnP IGD:2 router, so while I've written what I think the
UPNP_AddPinholeandUPNP_DeletePinholecode should look like. That code path is entirely hopeful and has not actually been tested at all.My hope is that by opening a PR, people with dual stack home networks can report here if they're properly downgrading to IPv4 address on unsupported routers, and an IPv6 address (with a working pinhole) on UPnP IGD:2 routers.
With enough confirmations, hopefully we can work out any bugs in the code path I wasn't able to test properly.
The part I have successfully tested is that we're now printing the IPv4 address on dual-stack networks, where we fail to open a UPnP pinhole.
That fixes my personal usage of pshs.
But given my brand new router still doesn't support pinhole. I'm guessing it may be a long time before any consumer routers actually implement this functionality and we can test the IPv6 portion of this PR.
Suggestions are welcome of course. C++ isn't one of my primary languages, so please let me know about any egregious mistakes or cases where things could be done better.