<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tteras/strongswan/src/frontends/android/jni/libandroidbridge/kernel, branch master</title>
<subtitle>tteras' strongSwan tree
</subtitle>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/'/>
<entry>
<title>android: Migrate to the Gradle build system</title>
<updated>2015-11-12T13:11:37+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-10-22T15:18:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=a50f3037ad30fa6020a4ec56e6afe3da7ca1731d'/>
<id>a50f3037ad30fa6020a4ec56e6afe3da7ca1731d</id>
<content type='text'>
This uses a manual way to trigger the NDK build (the default with
on-the-fly Android.mk files does not work for us).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses a manual way to trigger the NDK build (the default with
on-the-fly Android.mk files does not work for us).
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-interface: Pass the same data to del_policy() that was passed to add_policy()</title>
<updated>2015-11-10T15:42:52+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-09-16T14:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=a6e0f14fd2bf8b23fbfd808acc595e97d5e23a49'/>
<id>a6e0f14fd2bf8b23fbfd808acc595e97d5e23a49</id>
<content type='text'>
The additional data can be helpful to identify the exact policy to
delete.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The additional data can be helpful to identify the exact policy to
delete.
</pre>
</div>
</content>
</entry>
<entry>
<title>android: Retrigger a roam event if reportedly connected but no source address found</title>
<updated>2015-07-28T11:27:33+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-07-21T09:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=030bcee1b0f8cebce7cce1a87e33b98f3e1ed784'/>
<id>030bcee1b0f8cebce7cce1a87e33b98f3e1ed784</id>
<content type='text'>
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.

So we store the connectivity state and if we are reportedly connected but
still find no source address we trigger a roam event to recheck for an IPv4
address.  This will cause regular rechecks if a device enters an IPv6-only
network, but I guess that's rare (otherwise we could limit the number of
rechecks done between connectivity changes).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

So we store the connectivity state and if we are reportedly connected but
still find no source address we trigger a roam event to recheck for an IPv4
address.  This will cause regular rechecks if a device enters an IPv6-only
network, but I guess that's rare (otherwise we could limit the number of
rechecks done between connectivity changes).
</pre>
</div>
</content>
</entry>
<entry>
<title>android: Add method to check for connectivity to NetworkManager</title>
<updated>2015-07-28T11:27:33+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-07-21T09:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=41b59a3443a862825d9b59d613b9fa27bc4174da'/>
<id>41b59a3443a862825d9b59d613b9fa27bc4174da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>android: Fix kernel-net implementation on Android 4.3 and earlier</title>
<updated>2015-07-28T11:27:33+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-06-22T15:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=5da31733de79baf9249b45be1132c1e2f7203f4e'/>
<id>5da31733de79baf9249b45be1132c1e2f7203f4e</id>
<content type='text'>
Before fwmarks were used protected sockets were bound to the outbound
interface via SO_BINDTODEVICE.  This does not always seem to work well
together with our connect()/getsockname() trick if the server is covered
by the traffic selectors.  Calling protect() again after disconnecting
the socket seems to help, but if there is no connectivity at all we still
get the virtual IP back (maybe protect() does not bind the socket to any
interface then).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before fwmarks were used protected sockets were bound to the outbound
interface via SO_BINDTODEVICE.  This does not always seem to work well
together with our connect()/getsockname() trick if the server is covered
by the traffic selectors.  Calling protect() again after disconnecting
the socket seems to help, but if there is no connectivity at all we still
get the virtual IP back (maybe protect() does not bind the socket to any
interface then).
</pre>
</div>
</content>
</entry>
<entry>
<title>android: Add a custom kernel-net implementation to replace kernel-netlink</title>
<updated>2015-07-28T11:27:33+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-06-17T15:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=1082372448d8055b9ab2cd296a011b2f71eee3fe'/>
<id>1082372448d8055b9ab2cd296a011b2f71eee3fe</id>
<content type='text'>
When roaming from a mobile network to WiFi on Android 5.x the event
received via ConnectivityManager is triggered before the mobile
connection is fully torn down (i.e. before the interface is disabled and
the routes disappear).  So for strongSwan the current path still seems
valid and since no roam event is triggered later the daemon never switches
to WiFi and the connection is broken afterwards.

A possible solution to this is enabling roam events in the kernel-netlink
plugin.  That would trigger an event when the device is finally disconnected
from the mobile network.  However, this could actually take a some time,
during which traffic continues to be sent via mobile network instead of WiFi.
That's because Android now uses multiple routing tables, routing rules and
fwmarks to direct traffic to the appropriate interface/table, but in our
plugin we don't have the information available that would allow us to make
the switch to a different network/routing table earlier (and we actually
prefer the current path if it is still valid).  Additionally, the plugin
produces quite a bit more events than ConnectivityManager (which was one
of the reasons to use the latter in the first place).

This custom kernel-net implementation is now specifically tailored for
Android.  Roam events are still triggered via ConnectivityManager but
the source address is determined via connect()/getsockname() on a VPN
excluded UDP socket, which does use the correct routing table as intended
by Android.  That way the daemon immediately sees a different source IP
when connectivity changes even if the device is connected to multiple
networks concurrently.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When roaming from a mobile network to WiFi on Android 5.x the event
received via ConnectivityManager is triggered before the mobile
connection is fully torn down (i.e. before the interface is disabled and
the routes disappear).  So for strongSwan the current path still seems
valid and since no roam event is triggered later the daemon never switches
to WiFi and the connection is broken afterwards.

A possible solution to this is enabling roam events in the kernel-netlink
plugin.  That would trigger an event when the device is finally disconnected
from the mobile network.  However, this could actually take a some time,
during which traffic continues to be sent via mobile network instead of WiFi.
That's because Android now uses multiple routing tables, routing rules and
fwmarks to direct traffic to the appropriate interface/table, but in our
plugin we don't have the information available that would allow us to make
the switch to a different network/routing table earlier (and we actually
prefer the current path if it is still valid).  Additionally, the plugin
produces quite a bit more events than ConnectivityManager (which was one
of the reasons to use the latter in the first place).

This custom kernel-net implementation is now specifically tailored for
Android.  Roam events are still triggered via ConnectivityManager but
the source address is determined via connect()/getsockname() on a VPN
excluded UDP socket, which does use the correct routing table as intended
by Android.  That way the daemon immediately sees a different source IP
when connectivity changes even if the device is connected to multiple
networks concurrently.
</pre>
</div>
</content>
</entry>
<entry>
<title>libipsec: Pass separate inbound/update flags to the IPsec SA manager</title>
<updated>2015-03-09T17:18:20+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2015-03-09T17:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=607eebcfcff0bba300b54977669cce63c6f6a129'/>
<id>607eebcfcff0bba300b54977669cce63c6f6a129</id>
<content type='text'>
Similar to other kernel interfaces, the libipsec backends uses the flag for
different purposes, and therefore should get separate flags.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similar to other kernel interfaces, the libipsec backends uses the flag for
different purposes, and therefore should get separate flags.
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-interface: Raise expires with a proto/SPI/dst tuple instead of reqid</title>
<updated>2015-02-20T12:34:50+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2014-10-27T14:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=f81a9497483a7282c11adf5705d9ea3e83f6fffd'/>
<id>f81a9497483a7282c11adf5705d9ea3e83f6fffd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel-interface: Pass full list of traffic selectors to add_sa()</title>
<updated>2015-02-20T12:34:47+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2014-10-15T16:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=d05d85fe658321aff8d859eaf50704a21299b683'/>
<id>d05d85fe658321aff8d859eaf50704a21299b683</id>
<content type='text'>
While we can handle the first selector only in BEET mode in kernel-netlink,
passing the full list gives the backend more flexibility how to handle this
information.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we can handle the first selector only in BEET mode in kernel-netlink,
passing the full list gives the backend more flexibility how to handle this
information.
</pre>
</div>
</content>
</entry>
<entry>
<title>libipsec: Remove unused src/dst_ts parameters from ipsec_sa_mgr_t.add_sa()</title>
<updated>2015-02-20T12:34:47+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2014-10-15T16:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=fd9417607c05ebd8dcb1e7394550b4129aa096e9'/>
<id>fd9417607c05ebd8dcb1e7394550b4129aa096e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
