<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tteras/strongswan/src/libcharon/plugins/socket_default, 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>socket-default: Add an option to force the sending interface via IP_PKTINFO</title>
<updated>2017-05-23T14:49:39+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@strongswan.org</email>
</author>
<published>2016-09-16T12:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=9b29003cd9e12075070106eb9481954ab34912ca'/>
<id>9b29003cd9e12075070106eb9481954ab34912ca</id>
<content type='text'>
On Linux, setting the source address is insufficient to force a packet to be
sent over a certain path. The kernel uses the best route to select the outgoing
interface, even if we set a source address of a lower priority interface. This
is not only true for interfaces attaching to the same subnet, but also for
unrelated interfaces; the kernel (at least on 4.7) sends out the packet on
whatever interface it sees fit, even if that network does not expect packets
from the source address we force to.

When a better interface becomes available, strongSwan sends its MOBIKE address
list update using the old source address. But the kernel sends that packet over
the new best interface. If that network drops packets having the unexpected
source address from the old path, the MOBIKE update fails and the SA finally
times out.

To enforce a specific interface for our packet, we explicitly set the interface
index from the interface where the source address is installed. According to
ip(7), this overrules the specified source address to the primary interface
address. As this could have side effects to installations using multiple
addresses on a single interface, we disable the option by default for now.

This also allows using IPv6 link-local addresses, which won't work if
the outbound interface is not set explicitly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Linux, setting the source address is insufficient to force a packet to be
sent over a certain path. The kernel uses the best route to select the outgoing
interface, even if we set a source address of a lower priority interface. This
is not only true for interfaces attaching to the same subnet, but also for
unrelated interfaces; the kernel (at least on 4.7) sends out the packet on
whatever interface it sees fit, even if that network does not expect packets
from the source address we force to.

When a better interface becomes available, strongSwan sends its MOBIKE address
list update using the old source address. But the kernel sends that packet over
the new best interface. If that network drops packets having the unexpected
source address from the old path, the MOBIKE update fails and the SA finally
times out.

To enforce a specific interface for our packet, we explicitly set the interface
index from the interface where the source address is installed. According to
ip(7), this overrules the specified source address to the primary interface
address. As this could have side effects to installations using multiple
addresses on a single interface, we disable the option by default for now.

This also allows using IPv6 link-local addresses, which won't work if
the outbound interface is not set explicitly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use standard unsigned integer types</title>
<updated>2016-03-24T17:52:48+00:00</updated>
<author>
<name>Andreas Steffen</name>
<email>andreas.steffen@strongswan.org</email>
</author>
<published>2016-03-22T12:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=b12c53ce77beb8e04b044d0c0dc9249ddba72200'/>
<id>b12c53ce77beb8e04b044d0c0dc9249ddba72200</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libhydra: Remove empty unused library</title>
<updated>2016-03-03T16:36:11+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2016-02-12T15:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=28649f6d91971e0fe50078aec2937010e8c61cd8'/>
<id>28649f6d91971e0fe50078aec2937010e8c61cd8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libhydra: Move kernel interface to libcharon</title>
<updated>2016-03-03T16:36:11+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2016-02-12T14:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=8394ea2a42eb23ba22471d913dcf47e6067109e1'/>
<id>8394ea2a42eb23ba22471d913dcf47e6067109e1</id>
<content type='text'>
This moves hydra-&gt;kernel_interface to charon-&gt;kernel.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves hydra-&gt;kernel_interface to charon-&gt;kernel.
</pre>
</div>
</content>
</entry>
<entry>
<title>socket-default: Refactor setting source address when sending messages</title>
<updated>2015-11-09T15:43:21+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-11-02T15:22:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=47e113a63905305fdb7eee8304a5eb1adcb216d4'/>
<id>47e113a63905305fdb7eee8304a5eb1adcb216d4</id>
<content type='text'>
This ensures we don't pass data (via msg_control) defined in a different
scope to sendmsg().  Actually, some compilers (e.g. GCC 5.2.1) might
optimize the memcpy() call away causing the packets not to get sent from
the intended source address.

It also makes the code clearer than with all these ifdefs.

Fixes #1171.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures we don't pass data (via msg_control) defined in a different
scope to sendmsg().  Actually, some compilers (e.g. GCC 5.2.1) might
optimize the memcpy() call away causing the packets not to get sent from
the intended source address.

It also makes the code clearer than with all these ifdefs.

Fixes #1171.
</pre>
</div>
</content>
</entry>
<entry>
<title>socket-default: Refactor retrieval of destination address of received packets</title>
<updated>2015-11-09T15:42:20+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2015-11-02T15:16:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=99747bed8f0aea9427bd17820dbde79342bb9ce9'/>
<id>99747bed8f0aea9427bd17820dbde79342bb9ce9</id>
<content type='text'>
This makes the code a bit clearer than with the interleaved ifdefs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the code a bit clearer than with the interleaved ifdefs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed some typos, courtesy of codespell</title>
<updated>2014-12-15T16:11:14+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2014-12-15T16:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=3000f6aada33e5f4045591b496cc33298b9276fa'/>
<id>3000f6aada33e5f4045591b496cc33298b9276fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>socket-default: Use round-robin selection of sockets to read from</title>
<updated>2014-11-21T11:02:07+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2014-11-21T10:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=ed247660e81557261cd954e8b3ff19e410a347be'/>
<id>ed247660e81557261cd954e8b3ff19e410a347be</id>
<content type='text'>
If multiple sockets are ready, we previously preferred the IPv4 non-NAT socket
over others. To handle all with equal priority, use a round-robin selection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If multiple sockets are ready, we previously preferred the IPv4 non-NAT socket
over others. To handle all with equal priority, use a round-robin selection.
</pre>
</div>
</content>
</entry>
<entry>
<title>socket-default: Use poll(2) instead of select</title>
<updated>2014-11-21T11:02:07+00:00</updated>
<author>
<name>Martin Willi</name>
<email>martin@revosec.ch</email>
</author>
<published>2014-11-05T15:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=ce13ba62cc70fd6861ffc5e18f822cc3fb127841'/>
<id>ce13ba62cc70fd6861ffc5e18f822cc3fb127841</id>
<content type='text'>
It is not only simpler, but also allows the use of arbitrary high fd numbers,
which silently fails with select().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is not only simpler, but also allows the use of arbitrary high fd numbers,
which silently fails with select().
</pre>
</div>
</content>
</entry>
<entry>
<title>packet: Define a global default maximum size for IKE packets</title>
<updated>2014-10-10T07:32:42+00:00</updated>
<author>
<name>Tobias Brunner</name>
<email>tobias@strongswan.org</email>
</author>
<published>2014-09-16T13:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git-old.alpinelinux.org/user/tteras/strongswan/commit/?id=f00a9c171592c05cc6e77030b791e80525dd839b'/>
<id>f00a9c171592c05cc6e77030b791e80525dd839b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
