Log only the first line of a proxy request rejection message.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 14 Oct 2016 12:27:49 +0000 (14:27 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 14 Oct 2016 12:27:49 +0000 (14:27 +0200)
src/proxy.c

index 22d494718d959971e153f805b119e86ae1a71e6a..227be4a5e1cc6882021272f26785730a2842ba8a 100644 (file)
@@ -277,6 +277,8 @@ int receive_proxy_meta(connection_t *c, int start, int lenin) {
                                c->allow_request = ID;
                                return replen;
                        } else {
+                               p = memchr(c->buffer, '\n', c->buflen);
+                               p[-1] = 0;
                                logger(LOG_ERR, "Proxy request rejected: %s", c->buffer + 9);
                                return false;
                        }