Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-28 Thread Wolfgang Wiedmeyer
Fil writes: > Fil wrote: >> Wolfgang Wiedmeyer wrote: >> > >> > Wouldn't it be possible to e.g. read the property >> > dhcp.wlan0.gateway and check if it's empty or not? >> For sure, but I currently lack a way of doing it, without using shell >> commands. See above; same reasoning. >> I'm inves

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-28 Thread Wolfgang Wiedmeyer
Fil writes: > [...] > All the same, I make myself available to introduce the adaptation we > discussed of, including public IPs as valid ones for wlan0. > Though, it would be much better for me to avoid > "rewrite-rebuild-reflash-and-test", as it is a *VERY* onerous process of > developing, compa

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-16 Thread Fil
Fil wrote: > Wolfgang Wiedmeyer wrote: > > > > Wouldn't it be possible to e.g. read the property > > dhcp.wlan0.gateway and check if it's empty or not? > For sure, but I currently lack a way of doing it, without using shell > commands. See above; same reasoning. > I'm investigating android.net.Dh

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-15 Thread Fil
Wolfgang Wiedmeyer wrote: > > The reverse tether script checks if a gateway address is available and > if that's the case, it assumes that the network is configured. Didn't > you do the same in the first version of the patch? Did you drop that > solution because there was no method for it availab

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-13 Thread Wolfgang Wiedmeyer
Fil writes: > Joonas Kylmälä wrote: > [...] >> 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 th

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-13 Thread Wolfgang Wiedmeyer
Hi, see the corresponding issue[1] for my comments on the patch. I think the patch is a nice short and elegant solution for now. Fil writes: > Joonas Kylmälä wrote: >> I'm not talking about the method below the declarations, but instead >> about the code that is above the declarations: > > Yes,

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-08 Thread Tj
On 08/08/17 00:47, Fil wrote: > > 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

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-07 Thread Fil
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)

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-07 Thread Joonas Kylmälä
Fil: > It does matter, instead. > While IPv6 addresses are usually assigned in a globally-unique way, > that's not the case with IPv4, where most infrastructures heavily rely > on NAT'ing, hence giving devices behind a router/AP a private address > (i.e. 192.168.x.x or 10.x.x.x). Think about the 1

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-07 Thread Fil
Joonas Kylmälä wrote: > >> So it gives global i.e. public ipv6 address. > > I think it was pretty clear from the context that I was referring to > > IPv4. > > This shouldn't matter. I can test IPv4 in two weeks. It does matter, instead. While IPv6 addresses are usually assigned in a globally-uniq

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-07 Thread Joonas Kylmälä
Fil: > Joonas Kylmälä wrote: >> I'm not talking about the method below the declarations, but instead >> about the code that is above the declarations: > > Yes, I understood. > I'd seen your point the first time. Okay, it just made me doubt as you said "And that's what I did." for "Define fields e

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-07 Thread Fil
Joonas Kylmälä wrote: > I'm not talking about the method below the declarations, but instead > about the code that is above the declarations: Yes, I understood. I'd seen your point the first time. And I made mine, although it seems you're not willing to consider it. Anyway, if that's so important,

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-06 Thread Joonas Kylmälä
Fil: > Joonas Kylmälä wrote: >> It is common practice to define them at top of the file. Also the AOSP >> guidelines have it: >> . >> Well, now you might say that that is no reason but the thing is that >> people are exp

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-06 Thread Fil
Joonas Kylmälä wrote: > It is common practice to define them at top of the file. Also the AOSP > guidelines have it: > . > Well, now you might say that that is no reason but the thing is that > people are expecting them

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-06 Thread Joonas Kylmälä
Fil: > I put them there, close to "getNetworkInfoByInterfaceName()", just to > keep all my modifications together, so that it's easier to locate them > and remove them in the future. > They can be moved above getActiveNetworkInfo() if there's any strong > reason to do so. It is common practice to

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-06 Thread Fil
Hi Joonas, thank you for taking the time to read and comment on my patch! Joonas Kylmälä wrote: > Fil: > > +// TODO RepWifi extension. Remove when a low-level, long-lived > > solution is found. > > +private static final String IFACE_NAME_WIFI = "wlan0"; > > +private static final Strin

Re: [Replicant] [PATCH v2] Fix "RepWifi connection not correctly reported to userspace apps" Issue #1792.

2017-08-05 Thread Joonas Kylmälä
Hi, thanks for the work Fil. I have couple comments about the patch. Fil: > --- > .../com/android/server/ConnectivityService.java| 68 > ++ > 1 file changed, 68 insertions(+) > > diff --git > a/services/core/java/com/android/server/ConnectivityService.java > b/services/c