Merge branch '1.1' of github.com:gsliepen/tinc into thkr-1.1-ponyhof

This commit is contained in:
thorkill 2015-05-26 12:57:15 +02:00
commit 9bf36c8666
10 changed files with 83 additions and 14 deletions

View file

@ -1196,7 +1196,7 @@ static void try_tx_sptps(node_t *n, bool mtu) {
if(via != n) {
if((via->options >> 24) < 4)
return;
return try_tx_sptps(via, mtu);
return try_tx(via, mtu);
}
/* Otherwise, try to establish UDP connectivity. */
@ -1209,7 +1209,7 @@ static void try_tx_sptps(node_t *n, bool mtu) {
while we try to establish direct connectivity. */
if(!n->status.udp_confirmed && n != n->nexthop && (n->nexthop->options >> 24) >= 4)
try_tx_sptps(n->nexthop, mtu);
try_tx(n->nexthop, mtu);
}
static void try_tx_legacy(node_t *n, bool mtu) {
@ -1234,6 +1234,8 @@ static void try_tx_legacy(node_t *n, bool mtu) {
}
void try_tx(node_t *n, bool mtu) {
if(!n->status.reachable)
return;
if(n->status.sptps)
try_tx_sptps(n, mtu);
else
@ -1270,7 +1272,7 @@ void send_packet(node_t *n, vpn_packet_t *packet) {
if(n->status.sptps) {
send_sptps_packet(n, packet);
try_tx_sptps(n, true);
try_tx(n, true);
return;
}
@ -1290,7 +1292,7 @@ void send_packet(node_t *n, vpn_packet_t *packet) {
}
send_udppacket(via, packet);
try_tx_legacy(via, true);
try_tx(via, true);
}
void broadcast_packet(const node_t *from, vpn_packet_t *packet) {
@ -1473,7 +1475,7 @@ skip_harder:
if(to != myself) {
send_sptps_data(to, from, 0, DATA(&pkt), pkt.len);
try_tx_sptps(to, true);
try_tx(to, true);
return;
}
} else {