]> git.ipfire.org Git - thirdparty/strongswan.git/commit
android: Retrigger roam events on onLinkPropertiesChanged callbacks android-updates-linkprops
authorTobias Brunner <tobias@strongswan.org>
Tue, 21 Jul 2015 10:06:27 +0000 (12:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 21 Jul 2015 12:32:10 +0000 (14:32 +0200)
commitafed2c2a3e92229eefd47fc0309fad23beeb4e7d
tree6cc42dc4b91e60959a18936c1006b1738826d291
parent3e9ad21fe1642492c51d0f2e4048c758922e62c2
android: Retrigger roam events on onLinkPropertiesChanged callbacks

In dual-stack environments the IPv6 connectivity (via autoconfiguration)
might be established before the IPv4 connectivity (via DHCP).  It seems
Android triggers the CONNECTIVITY_ACTION broadcast already when the first
family is fully configured.  At that time we might not be able to find an
IPv4 source address.  And since Android does not trigger the broadcast
again if IPv4 connectivity is established, the connection is broken
afterwards.

Since Android 5.0 ConnectivityManager provides a new callback framework.
There the onLinkPropertiesChanged callback is triggered on the active
interface if e.g. new IP addresses or routes get added.  We can use
this to trigger additional roaming events when the IPv4 connectivity is
established later.  It might get triggered a bit more often than we
like, and it might get triggered when not needed (e.g. if IPv4
connectivity is established before IPv6).

 #865.
src/frontends/android/src/org/strongswan/android/logic/NetworkManager.java