This tries to match what is done for packets using the legacy protocol.
However, since SPTPS is end-to-end encrypted, Forwarding = kernel cannot
be implemented. In that case, we also drop the packets.
.Pp
This is the default mode, and unless you really know you need another forwarding mode, don't change it.
.It kernel
-Incoming packets are always sent to the TUN/TAP device, even if the packets are not for the local node.
+Incoming packets using the legacy protocol are always sent to the TUN/TAP device,
+even if the packets are not for the local node.
This is less efficient, but allows the kernel to apply its routing and firewall rules on them,
and can also help debugging.
+Incoming packets using the SPTPS protocol are dropped, since they are end-to-end encrypted.
.El
.It Va Hostnames Li = yes | no Pq no
This option selects whether IP addresses (both real and on the VPN) should
This is the default mode, and unless you really know you need another forwarding mode, don't change it.
@item kernel
-Incoming packets are always sent to the TUN/TAP device, even if the packets are not for the local node.
+Incoming packets using the legacy protocol are always sent to the TUN/TAP device,
+even if the packets are not for the local node.
This is less efficient, but allows the kernel to apply its routing and firewall rules on them,
and can also help debugging.
+Incoming packets using the SPTPS protocol are dropped, since they are end-to-end encrypted.
@end table
@cindex Hostnames
#include "node.h"
#include "prf.h"
#include "protocol.h"
+#include "route.h"
#include "sptps.h"
#include "utils.h"
#include "xalloc.h"
if(to != myself) {
/* We don't just forward the request, because we want to use UDP if it's available. */
- send_sptps_data(to, from, 0, buf, len);
- try_tx(to, true);
+ if(forwarding_mode == FMODE_INTERNAL) {
+ send_sptps_data(to, from, 0, buf, len);
+ try_tx(to, true);
+ }
} else {
/* The packet is for us */
if(!sptps_receive_data(&from->sptps, buf, len)) {