Import Upstream version 1.0.26

This commit is contained in:
Guus Sliepen 2019-08-26 13:44:46 +02:00
parent 45b80e247e
commit b33a93f7f6
28 changed files with 650 additions and 553 deletions

View file

@ -40,6 +40,7 @@
#endif
int addressfamily = AF_UNSPEC;
int mintimeout = 0;
int maxtimeout = 900;
int seconds_till_retry = 5;
int udp_rcvbuf = 0;
@ -77,6 +78,11 @@ static void configure_tcp(connection_t *c) {
option = IPTOS_LOWDELAY;
setsockopt(c->socket, SOL_IP, IP_TOS, (void *)&option, sizeof(option));
#endif
#if defined(IPPROTO_IPV6) && defined(IPV6_TCLASS) && defined(IPTOS_LOWDELAY)
option = IPTOS_LOWDELAY;
setsockopt(c->socket, IPPROTO_IPV6, IPV6_TCLASS, (void *)&option, sizeof(option));
#endif
}
static bool bind_to_interface(int sd) {
@ -273,6 +279,9 @@ int setup_vpn_in_socket(const sockaddr_t *sa) {
void retry_outgoing(outgoing_t *outgoing) {
outgoing->timeout += 5;
if(outgoing->timeout < mintimeout)
outgoing->timeout = mintimeout;
if(outgoing->timeout > maxtimeout)
outgoing->timeout = maxtimeout;