Don't send proxy requests for incoming connections.
[oweals/tinc.git] / src / protocol.c
index f36538e382899ca4f4d3a27ff4267899fb64f185..9ef90825c75ac535d3aad463f5742dde49c28137 100644 (file)
@@ -125,7 +125,7 @@ void forward_request(connection_t *from) {
 bool receive_request(connection_t *c) {
        int request;
 
-       if(proxytype == PROXY_HTTP && c->allow_request == ID) {
+       if(c->outgoing && proxytype == PROXY_HTTP && c->allow_request == ID) {
                if(!c->buffer[0] || c->buffer[0] == '\r')
                        return true;
                if(!strncasecmp(c->buffer, "HTTP/1.1 ", 9)) {