X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=ebc46f32ae3bf57559ecb0d90938d7e8390e66f8;hb=63daebcd1ec2975c0c2ad8e0ee0fced33b1fbbf0;hp=a4d97aeb7f3b39b77b0b48916ce7564a2592bacc;hpb=111040d7d1993c67246c52cbfd073183818655f9;p=tinc diff --git a/src/protocol_key.c b/src/protocol_key.c index a4d97aeb..ebc46f32 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -399,7 +399,9 @@ bool ans_key_h(connection_t *c, const char *request) { update_node_udp(from, &sa); } - if(from->options & OPTION_PMTU_DISCOVERY && !(from->options & OPTION_TCPONLY)) + /* Don't send probes if we can't send UDP packets directly to that node. + TODO: the indirect (via) condition can change at any time as edges are added and removed, so this should probably be moved to graph.c. */ + if((from->via == myself || from->via == from) && from->options & OPTION_PMTU_DISCOVERY && !(from->options & OPTION_TCPONLY)) send_mtu_probe(from); }