]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: tcp: use the build options list to report transparent modes
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 17:55:02 +0000 (18:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 20:30:54 +0000 (21:30 +0100)
This removes 6 #ifdef from haproxy.c.

src/haproxy.c
src/proto_tcp.c

index 22b6ffaee97370ac8304025e242b4d650a9ae53c..e9dca47334d65237a9823f488cd5e3966b59b726 100644 (file)
@@ -431,29 +431,6 @@ static void display_build_opts()
        printf("Built without Lua support\n");
 #endif
 
-#if defined(CONFIG_HAP_TRANSPARENT)
-       printf("Built with transparent proxy support using:"
-#if defined(IP_TRANSPARENT)
-              " IP_TRANSPARENT"
-#endif
-#if defined(IPV6_TRANSPARENT)
-              " IPV6_TRANSPARENT"
-#endif
-#if defined(IP_FREEBIND)
-              " IP_FREEBIND"
-#endif
-#if defined(IP_BINDANY)
-              " IP_BINDANY"
-#endif
-#if defined(IPV6_BINDANY)
-              " IPV6_BINDANY"
-#endif
-#if defined(SO_BINDANY)
-              " SO_BINDANY"
-#endif
-              "\n");
-#endif
-
        list_for_each_entry(item, &build_opts_list, list) {
                puts(item->str);
        }
index f6d8ca13c7dc32bd092f069f65b50519d214dd58..d7650325dfe13b2fefe57d8cb4e4646e40895571 100644 (file)
@@ -1875,6 +1875,28 @@ static void __tcp_protocol_init(void)
        tcp_res_cont_keywords_register(&tcp_res_cont_actions);
        http_req_keywords_register(&http_req_actions);
        http_res_keywords_register(&http_res_actions);
+
+
+       hap_register_build_opts("Built with transparent proxy support using:"
+#if defined(IP_TRANSPARENT)
+              " IP_TRANSPARENT"
+#endif
+#if defined(IPV6_TRANSPARENT)
+              " IPV6_TRANSPARENT"
+#endif
+#if defined(IP_FREEBIND)
+              " IP_FREEBIND"
+#endif
+#if defined(IP_BINDANY)
+              " IP_BINDANY"
+#endif
+#if defined(IPV6_BINDANY)
+              " IPV6_BINDANY"
+#endif
+#if defined(SO_BINDANY)
+              " SO_BINDANY"
+#endif
+               "", 0);
 }