Try to use UDP to relay SPTPS packets received over TCP.
authorEtienne Dechamps <etienne@edechamps.fr>
Sat, 9 May 2015 17:09:23 +0000 (18:09 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 10 May 2015 20:08:57 +0000 (21:08 +0100)
commit10c1f60c643607d9dafd79271c3475cddf81e903
treef9952ffea44cf8c9ff156b32b47369dfe2239332
parent1296f715b57c88c17299cacadaccdc0be898e0b1
Try to use UDP to relay SPTPS packets received over TCP.

Currently, when tinc receives a SPTPS packet over TCP via the REQ_KEY
encapsulation mechanism, it forwards it like any other TCP request. This
is inefficient, because even though we received the packet over TCP,
we might have an UDP link with the next hop, which means the packet
could be sent over UDP.

This commit removes that limitation by making sure SPTPS data packets
received through REQ_KEY requests are not forwarded as-is but passed
to send_sptps_data() instead, thereby using the same code path as if
the packet was received over UDP.
src/protocol_key.c