projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve failure detection in the test suite.
[tinc]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
3f2fb48
..
7bb182d
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-743,10
+743,10
@@
static void choose_udp_address(const node_t *n, const sockaddr_t **sa, size_t *s
So we pick a random edge and a random socket. */
unsigned int i = 0;
So we pick a random edge and a random socket. */
unsigned int i = 0;
- unsigned int j = rand() % n->edge_tree
->
count;
+ unsigned int j = rand() % n->edge_tree
.
count;
edge_t *candidate = NULL;
edge_t *candidate = NULL;
- for splay_each(edge_t, e, n->edge_tree) {
+ for splay_each(edge_t, e,
&
n->edge_tree) {
if(i++ == j) {
candidate = e->reverse;
break;
if(i++ == j) {
candidate = e->reverse;
break;
@@
-767,10
+767,10
@@
static void choose_local_address(const node_t *n, const sockaddr_t **sa, size_t
/* Pick one of the edges from this node at random, then use its local address. */
unsigned int i = 0;
/* Pick one of the edges from this node at random, then use its local address. */
unsigned int i = 0;
- unsigned int j = rand() % n->edge_tree
->
count;
+ unsigned int j = rand() % n->edge_tree
.
count;
edge_t *candidate = NULL;
edge_t *candidate = NULL;
- for splay_each(edge_t, e, n->edge_tree) {
+ for splay_each(edge_t, e,
&
n->edge_tree) {
if(i++ == j) {
candidate = e;
break;
if(i++ == j) {
candidate = e;
break;
@@
-1638,7
+1638,7
@@
void broadcast_packet(const node_t *from, vpn_packet_t *packet) {
break;
}
break;
}
- for splay_each(node_t, n, node_tree)
+ for splay_each(node_t, n,
&
node_tree)
if(n->status.reachable && n != myself && ((n->via == myself && n->nexthop == n) || n->via == n)) {
send_packet(n, packet);
}
if(n->status.reachable && n != myself && ((n->via == myself && n->nexthop == n) || n->via == n)) {
send_packet(n, packet);
}
@@
-1661,7
+1661,7
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
bool hard = false;
static time_t last_hard_try = 0;
bool hard = false;
static time_t last_hard_try = 0;
- for splay_each(node_t, n, node_tree) {
+ for splay_each(node_t, n,
&
node_tree) {
if(!n->status.reachable || n == myself) {
continue;
}
if(!n->status.reachable || n == myself) {
continue;
}
@@
-1672,7
+1672,7
@@
static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
bool soft = false;
bool soft = false;
- for splay_each(edge_t, e, n->edge_tree) {
+ for splay_each(edge_t, e,
&
n->edge_tree) {
if(!e->reverse) {
continue;
}
if(!e->reverse) {
continue;
}