[Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.
Fil
fil.bergamo at riseup.net
Mon Aug 7 23:47:36 UTC 2017
Joonas Kylmälä wrote:
> Think about the 1% who do not use NAT (actually in Finland the ISPs give
> usually 5 IPv4 addresses so it might not be too uncommon). You mentioned
> earlier the link local addresses so we could make a list of similar
> non-working IPv4 addresses (in case there are others) and then check if
> the address belongs to that list and act accordingly. The function
> isLinkLocalAddress() can be used.
I didn't know about the situation in Finland. I'm still doubtful about
those public addresses being actually assigned directly to your WLAN
interface, but I guess I don't know enough to assume they're not. Let's
say we need to consider that 1% chance too..
Maybe someone else in this list knows more about networks and can make
it clear to us?
> I also thought about making a list of valid IP addresses, i.e., site
> local addresses + public ip addresses but how do we know what is public
> ip address? The java.net.InetAddress class didn't have any methods for
> that so implementing it in this way doesn't sound very promising.
>
> What are your thoughts on this?
Well, I guess an IP address is considered to be public if it doesn't
fall in any reserved range.
That is, basically, if it's not link-local nor site-local, nor is it
localhost, then it could be considered public (I think we can safely
ignore other reserved ranges).
In this respect, I guess the condition could simply be reversed to be:
if (a.getHostAddress() != null && ! a.isLinkLocalAddress())
Checking for a loopback address on a WLAN interface is overkill IMHO.
The only thing that really matters in this case is to filter out
link-local addresses, which have a non-negligible chance to be assinged
to the interface.
That said, I'm willing to make that change in my patch.
But I'd like to have feedback from the maintainers before proceeding.
Just in case anything else needs to be addressed.
Above all, I'd like to first be sure my patch can be accepted and
merged, before doing any other work on it.
For now, thanks for your suggestions.
Regards,
Fil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20170808/f0d8cc41/attachment.asc>
More information about the Replicant
mailing list