X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=a0a184622b98c650decea8d8b4b556f395905cc3;hp=a7de07e3465847e74defdb64b335b185490de33c;hb=e88b3fb52fb375cd8ab233a671f38ed2240ed828;hpb=87f96aec8c48327d879c20ff2b789c88a675173d diff --git a/src/protocol_key.c b/src/protocol_key.c index a7de07e3..a0a18462 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -29,6 +29,7 @@ #include "node.h" #include "prf.h" #include "protocol.h" +#include "route.h" #include "sptps.h" #include "utils.h" #include "xalloc.h" @@ -150,8 +151,10 @@ static bool req_key_ext_h(connection_t *c, const char *request, node_t *from, no 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)) {