Hi Richard,

On 01/06/2014 02:12 PM, Richard Röjfors wrote:
Hi,

I have looked at the online state and have some questions regarding its
purpose.

As I see it, this is just an intermediate state shortly after IP
configuration is finished. Then if the internet access is lost or gained
after that point is not reflected in the state.

For instance I see if I reboot my access point, the online check fails,
because the access point is not ready to forward data to the internet when
the local wifi is available. So the network will never be considered
online. I modified the code to retry the check once, the second check
succeeds and I'm online.

And the same goes if the uplink to the network disappears connman won't
detect that and consider still consider the service online.

So my conclusion is that the online state is not actually reflecting the
real state.

So what is the purpose of this check, more than wispr handling?

Would it be stupid the schedule the check like every 10 seconds or so to
really check the current state?

As you noted, the online state is not updated if something changes. The
code for this is just missing. How to do it might be a bit more complex
because polling is normally the 'worst' solution.

If the router is going away, and an application tries to send data I
expect that the networking stack gives some feedback. Obviously,
without traffic it is hard to figure out the state of the connection.
But still I would monitor the ARP cache for this.

# ip monitor all

...
[NEIGH]192.168.178.2 dev p17p1  FAILED
[NEIGH]192.168.178.2 dev p17p1  FAILED
[NEIGH]192.168.178.2 dev p17p1  FAILED
[NEIGH]192.168.178.2 dev p17p1  FAILED
[NEIGH]192.168.178.2 dev p17p1  FAILED
[ROUTE]Deleted fe80::2665:11ff:feb9:d8af dev p17p1  metric 0
    cache
[ROUTE]Deleted ff02::1:2 dev p17p1  metric 0
    cache
[ROUTE]Deleted ff02::1:ffd1:e0b3 dev p17p1  metric 0
    cache
[ROUTE]2a00:1450:4013:c01::75 via fe80::2665:11ff:feb9:d8af dev p17p1 metric 0
    cache
[ROUTE]2a00:1450:4005:808::1010 via fe80::2665:11ff:feb9:d8af dev p17p1 metric 0
    cache
[ROUTE]Deleted 2a00:1450:4005:808::1010 via fe80::2665:11ff:feb9:d8af dev p17p1 metric 0
    cache
[ROUTE]ff02::1:2 dev p17p1  metric 0
    cache
[ROUTE]ff02::1:ffd1:e0b3 dev p17p1  metric 0
    cache
[ROUTE]fe80::2665:11ff:feb9:d8af dev p17p1  metric 0
    cache
[ROUTE]Deleted 2a00:1450:4013:c00::75 via fe80::2665:11ff:feb9:d8af dev p17p1 metric 0
    cache
[ROUTE]Deleted fe80::2665:11ff:feb9:d8af dev p17p1  metric 0
    cache
[ROUTE]Deleted ff02::1:2 dev p17p1  metric 0
    cache
[ROUTE]Deleted ff02::1:ffd1:e0b3 dev p17p1  metric 0
    cache
[ROUTE]ff02::1:2 dev p17p1  metric 0
    cache
[ROUTE]ff02::1:ffd1:e0b3 dev p17p1  metric 0
    cache
[ROUTE]fe80::2665:11ff:feb9:d8af dev p17p1  metric 0
    cache


As you can see I tried to ping 192.168.178.2 which happens not to exist
in my network.

cheers,
daniel
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to