]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proto-tcp: Register a feature to report TCP MD5 signature support
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Jul 2025 07:14:08 +0000 (09:14 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Jul 2025 07:51:24 +0000 (09:51 +0200)
"HAVE_TCP_MD5SIG" feature is now registered if TCP MD5 signature is
supported. This will help the feature detection in the reg-test script
dedicated to this feature.

reg-tests/connection/tcp_md5_signature.vtc
src/proto_tcp.c

index 8ea214b8cc65f028c003d8f2890888aadb38137f..383658e747578694295f26603137e424c1c12f3f 100644 (file)
@@ -1,10 +1,7 @@
 varnishtest "Test the support for tcp-md5sig option (linux only)"
 
+feature cmd "$HAPROXY_PROGRAM -cc 'feature(HAVE_TCP_MD5SIG)'"
 feature ignore_unknown_macro
-feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.3-dev1)'"
-
-#EXCLUDE_TARGETS=solaris,freebsd,freebsd-glibc,dragonfly,openbsd,netbsd,cygwin,haiku,aix51,aix52,aix72-gcc,osx,generic,custom
-
 
 haproxy h1 -conf {
     defaults
index b84a4c5e6903e96b2915ecfff0fd6043269fe7a9..ea9f4c9fec6eff887e00e6ec71399172139d31e9 100644 (file)
@@ -984,6 +984,14 @@ static int tcp_get_info(struct connection *conn, long long int *info, int info_n
 #endif /* TCP_INFO */
 
 
+static void __proto_tcp_init(void)
+{
+#if defined(__linux__) && !defined(TCP_MD5SIG)
+       hap_register_feature("HAVE_TCP_MD5SIG");
+#endif
+}
+INITCALL0(STG_REGISTER, __proto_tcp_init);
+
 /*
  * Local variables:
  *  c-indent-level: 8