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

[Feature]: ConnectionInfoDialog does not show the IPv6 Address if available #4207

Closed
PeterPeet opened this issue Jul 14, 2023 · 3 comments · Fixed by #4208
Closed

[Feature]: ConnectionInfoDialog does not show the IPv6 Address if available #4207

PeterPeet opened this issue Jul 14, 2023 · 3 comments · Fixed by #4208
Assignees
Labels
feature Adding functionality that adds value

Comments

@PeterPeet
Copy link

Describe the Problem

ConnectionInfoDialog only shows IPv4 information

The Solution you'd like

Add the IPv6 information of the local active interface to the ConnectionInfoDialog.

Alternatives that you've considered.

No response

Additional Context

No response

@PeterPeet PeterPeet added the feature Adding functionality that adds value label Jul 14, 2023
PeterPeet pushed a commit to PeterPeet/maptool that referenced this issue Jul 14, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 25, 2023
#4207 #4206 Changed the ConnectionInfoDialog to show active interface…
@kwvanderlinde kwvanderlinde moved this to Needs Testing in MapTool 1.14.0 Oct 23, 2023
@kwvanderlinde
Copy link
Collaborator

Tested. There's a couple quirks, but no deal breakers for the 1.14.0 release (i.e., can make new issues to address these as needed).

First, for the UX:

  1. The labels for the IPv4 and IPv6 local addresses are the same. This can be a little confusing, especially if one of the fields is set to is "Unknown".
  2. The dialog is still very narrow. This doesn't leave enough room for any IPv6 addresses to be display without the user expanding the dialog themselves.

And for functionality (these are real questions on my part as I'm no expert in networking):

  1. I use ZeroTier specifically to help with MapTool connections. I am finding that the dialog shows my ZeroTier (10.xxx.xxx.xxx) address, which I will personally find useful. But I was also surprised to see it as opposed to my LAN address (192.xxx.xxx.xxx), and am also not sure it will consistently be preferred. Is there any kind of interface priority or something that guarantees which one is used, and do we need to somehow influence that choice?
  2. I am seeing that the local IPv6 address has a scope ID. E.g., right now I am seeing <<ipv6 address>>%wlp4s0. I'm not accustomed to seeing this in addresses, and initially thought it was included mistakenly. Is it desirable to include the scope ID? Any upsides / downsides to including the scope ID or not?

@kwvanderlinde
Copy link
Collaborator

Tested some more and found one definite bug. It's possible to get an IPv6 showing in the IPv4 box even if a local IPv4 address is available. For me I did this by bringing down some interfaces (my ZeroTier ones in this case), then opened MapTool and checked the Connection Information.

Looking at the PR, I see the culprit:

          if (!v6 && inetAddress instanceof InetAddress) {
            return inetAddress.getHostAddress();
          }

That instanceof should be checking against Inet4Address (we already know it is an InetAddress).

@Azhrei
Copy link
Member

Azhrei commented Oct 31, 2023

Good catches on the UX stuff.

  1. I use ZeroTier specifically to help with MapTool connections. I am finding that the dialog shows my ZeroTier (10.xxx.xxx.xxx) address, which I will personally find useful. But I was also surprised to see it as opposed to my LAN address (192.xxx.xxx.xxx), and am also not sure it will consistently be preferred. Is there any kind of interface priority or something that guarantees which one is used, and do we need to somehow influence that choice?

The VPN address is the correct one to show. Other clients will need to know that IP address in order to use the Direct connection tab in the Connect To Server... dialog.

Each operating system has its own techniques for determining which interfaces are provided when an application iterates over the available ones. Interfaces that are "down" will generally not be provided at all (except for apps like tcpdump or other network sniffers that will put the NIC into promiscuous mode).

Having a dialog that shows all available interfaces and letting the user chose one would be good, although it's likely TMI for most users, so we should auto-select the one that makes the most sense (based on scanning each NIC for a router that can connect to the web, with the highest preference given to one with UPNP enabled).

I have screen layouts for a "wizard"-style dialog that walks users through the steps of deciding how to set things up, with each step's answer used to cull the list of options for the next step.

  1. I am seeing that the local IPv6 address has a scope ID. E.g., right now I am seeing <<ipv6 address>>%wlp4s0. I'm not accustomed to seeing this in addresses, and initially thought it was included mistakenly. Is it desirable to include the scope ID? Any upsides / downsides to including the scope ID or not?

Based on this SO answer it would seem that we don't need to present the scope ID. (It's only valid use is something MapTool would never do.) However, presenting it on the screen is likely to match how it's presented by the operating system during ifconfig/ipconfig commands, for example, so it probably should be displayed in MapTool for consistency's sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
Status: Needs Testing
Development

Successfully merging a pull request may close this issue.

3 participants