projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow a port to be specified in BindToAddress statements.
[tinc]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
18a898d
..
b11949a
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-1,7
+1,7
@@
/*
net_packet.c -- Handles in- and outgoing VPN packets
Copyright (C) 1998-2005 Ivo Timmermans,
/*
net_packet.c -- Handles in- and outgoing VPN packets
Copyright (C) 1998-2005 Ivo Timmermans,
- 2000-201
1
Guus Sliepen <guus@tinc-vpn.org>
+ 2000-201
2
Guus Sliepen <guus@tinc-vpn.org>
2010 Timothy Redaelli <timothy@redaelli.eu>
2010 Brandon Black <blblack@gmail.com>
2010 Timothy Redaelli <timothy@redaelli.eu>
2010 Brandon Black <blblack@gmail.com>
@@
-138,7
+138,10
@@
void send_mtu_probe(node_t *n) {
memset(packet.data, 0, 14);
RAND_pseudo_bytes(packet.data + 14, len - 14);
packet.len = len;
memset(packet.data, 0, 14);
RAND_pseudo_bytes(packet.data + 14, len - 14);
packet.len = len;
- packet.priority = i < 3 ? 0 : -1;
+ if(i >= 3 && n->mtuprobes <= 10)
+ packet.priority = -1;
+ else
+ packet.priority = 0;
ifdebug(TRAFFIC) logger(LOG_INFO, "Sending MTU probe length %d to %s (%s)", len, n->name, n->hostname);
ifdebug(TRAFFIC) logger(LOG_INFO, "Sending MTU probe length %d to %s (%s)", len, n->name, n->hostname);
@@
-534,7
+537,7
@@
static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
if(n->mtu >= origlen)
n->mtu = origlen - 1;
} else
if(n->mtu >= origlen)
n->mtu = origlen - 1;
} else
-
logger(LOG_ERR
, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno));
+
ifdebug(TRAFFIC) logger(LOG_WARNING
, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno));
}
end:
}
end: