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 22d4947..227be4a 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;
                        }