diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index a9fdf8445ad..f802427cba7 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -1109,8 +1109,8 @@ int tcpconn_read_haproxy(struct tcp_connection *c) { return 1; /* EOF? Return "no IP change" in any case */ } else { - /* Wrong protocol */ - return -1; + /* Wrong protocol*/ + return 2; } done: @@ -1167,6 +1167,8 @@ struct tcp_connection* tcpconn_new(int sock, union sockaddr_union* su, goto error; } else if (ret == 1) { LM_DBG("PROXY protocol did not override IP addresses\n"); + } else if (ret == 2) { + LM_DBG("PROXY protocol header not found. can't owerride IP addresses\n"); } } print_ip("tcpconn_new: new tcp connection: ", &c->rcv.src_ip, "\n");