From: Alan T. DeKok Date: Tue, 27 Jul 2021 12:40:44 +0000 (-0400) Subject: we support PROXY protocol only for TLS X-Git-Tag: release_3_0_24~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=310597833ddaeba5e4ca3af2530579115fd32059;p=thirdparty%2Ffreeradius-server.git we support PROXY protocol only for TLS --- diff --git a/src/main/listen.c b/src/main/listen.c index 314e11677c..4df872b6e9 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -1189,11 +1189,6 @@ int common_socket_parse(CONF_SECTION *cs, rad_listen_t *this) } else if (strcmp(proto, "tcp") == 0) { sock->proto = IPPROTO_TCP; - /* - * Add support for http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt - */ - rcode = cf_item_parse(cs, "proxy_protocol", FR_ITEM_POINTER(PW_TYPE_BOOLEAN, &this->proxy_protocol), NULL); - if (rcode < 0) return -1; } else { cf_log_err_cs(cs, "Unknown proto name \"%s\"", proto); @@ -1226,6 +1221,12 @@ int common_socket_parse(CONF_SECTION *cs, rad_listen_t *this) return -1; } + /* + * Add support for http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt + */ + rcode = cf_item_parse(cs, "proxy_protocol", FR_ITEM_POINTER(PW_TYPE_BOOLEAN, &this->proxy_protocol), NULL); + if (rcode < 0) return -1; + /* * If unset, set to default. */