projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix DecrementTTL option for packets destined to the local node.
[tinc]
/
src
/
meta.c
diff --git
a/src/meta.c
b/src/meta.c
index
e60c127
..
e62c3b7
100644
(file)
--- a/
src/meta.c
+++ b/
src/meta.c
@@
-1,6
+1,6
@@
/*
meta.c -- handle the meta communication
/*
meta.c -- handle the meta communication
- Copyright (C) 2000-20
09
Guus Sliepen <guus@tinc-vpn.org>,
+ Copyright (C) 2000-20
14
Guus Sliepen <guus@tinc-vpn.org>,
2000-2005 Ivo Timmermans
2006 Scott Lamb <slamb@slamb.org>
2000-2005 Ivo Timmermans
2006 Scott Lamb <slamb@slamb.org>
@@
-178,19
+178,19
@@
bool receive_meta(connection_t *c) {
if(c->tcplen) {
if(c->tcplen <= c->buflen) {
if(!c->node) {
if(c->tcplen) {
if(c->tcplen <= c->buflen) {
if(!c->node) {
- if(proxytype == PROXY_SOCKS4 && c->allow_request == ID) {
+ if(
c->outgoing &&
proxytype == PROXY_SOCKS4 && c->allow_request == ID) {
if(c->buffer[0] == 0 && c->buffer[1] == 0x5a) {
if(c->buffer[0] == 0 && c->buffer[1] == 0x5a) {
- logger(LOG_DEBUG, "Proxy request granted");
+
ifdebug(CONNECTIONS)
logger(LOG_DEBUG, "Proxy request granted");
} else {
logger(LOG_ERR, "Proxy request rejected");
return false;
}
} else {
logger(LOG_ERR, "Proxy request rejected");
return false;
}
- } else if(proxytype == PROXY_SOCKS5 && c->allow_request == ID) {
+ } else if(
c->outgoing &&
proxytype == PROXY_SOCKS5 && c->allow_request == ID) {
if(c->buffer[0] != 5) {
logger(LOG_ERR, "Invalid response from proxy server");
return false;
}
if(c->buffer[0] != 5) {
logger(LOG_ERR, "Invalid response from proxy server");
return false;
}
- if(c->buffer[1] == 0xff) {
+ if(c->buffer[1] ==
(char)
0xff) {
logger(LOG_ERR, "Proxy request rejected: unsuitable authentication method");
return false;
}
logger(LOG_ERR, "Proxy request rejected: unsuitable authentication method");
return false;
}
@@
-199,9
+199,9
@@
bool receive_meta(connection_t *c) {
return false;
}
if(c->buffer[3] == 0) {
return false;
}
if(c->buffer[3] == 0) {
- logger(LOG_DEBUG, "Proxy request granted");
+
ifdebug(CONNECTIONS)
logger(LOG_DEBUG, "Proxy request granted");
} else {
} else {
- logger(LOG_
DEBUG
, "Proxy request rejected");
+ logger(LOG_
ERR
, "Proxy request rejected");
return false;
}
} else {
return false;
}
} else {