]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we support PROXY protocol only for TLS
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jul 2021 12:40:44 +0000 (08:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Jul 2021 12:40:44 +0000 (08:40 -0400)
src/main/listen.c

index 314e11677ce72d77cdeb0b8d081298a670325c0d..4df872b6e9bb3e67edd2b8d94a07d41dd2e66872 100644 (file)
@@ -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.
                         */