summaryrefslogtreecommitdiffstats
path: root/tests/echo_srv.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2020-06-19 23:26:25 +0200
committerStefan Metzmacher <metze@samba.org>2020-06-19 23:26:25 +0200
commita6f95ed59e2bc5a5d732738be7046e1e8422fb26 (patch)
tree2cde84e3519a00ede6633ac4e932ad26b5487124 /tests/echo_srv.c
parentf13db2b166dd9cc0ee31b5cdffdacb34945d615a (diff)
Revert "test_echo_tcp_socket_options.c: add tests for TCP_INFO"
This reverts commit a37c0175492fb1b35257b785c71dea4e4f6d4750. This got merged automatically by gitlab without review. Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'tests/echo_srv.c')
-rw-r--r--tests/echo_srv.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/echo_srv.c b/tests/echo_srv.c
index 87c85f7..93778f2 100644
--- a/tests/echo_srv.c
+++ b/tests/echo_srv.c
@@ -9,10 +9,6 @@
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <netinet/tcp.h>
-#ifdef HAVE_NETINET_TCP_FSM_H
-#include <netinet/tcp_fsm.h>
-#endif
#include <netdb.h>
#include <resolv.h>
@@ -319,34 +315,6 @@ static int setup_srv(struct echo_srv_opts *opts, int *_sock)
perror("listen");
return ret;
}
-#ifdef TCP_INFO
- {
- struct tcp_info info;
- socklen_t optlen = sizeof(info);
-
- ZERO_STRUCT(info);
- ret = getsockopt(sock, IPPROTO_TCP, TCP_INFO, &info, &optlen);
- if (ret == -1) {
- ret = errno;
- perror("TCP_INFO failed");
- close(sock);
- return ret;
- }
-#ifdef HAVE_NETINET_TCP_FSM_H
-/* This is FreeBSD */
-# define __TCP_LISTEN TCPS_LISTEN
-#else
-/* This is Linux */
-# define __TCP_LISTEN TCP_LISTEN
-#endif
- if (info.tcpi_state != __TCP_LISTEN) {
- errno = ret = ERANGE;
- perror("not __TCP_LISTEN => ERANGE...");
- close(sock);
- return ret;
- }
- }
-#endif /* TCP_INFO */
}
*_sock = sock;