aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/tcp/tcp_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-17 13:34:58 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-17 13:34:58 -0800
commitff66ec5f43547abc78b22ebcdfad32e2775bc9cb (patch)
treef92d0ad15cbb1ee8470226a436ef0403c9d49b2e /src/sp/transport/tcp/tcp_test.c
parent48d0c0340f16b580443b3aba53c8bf618572fa6a (diff)
downloadnng-ff66ec5f43547abc78b22ebcdfad32e2775bc9cb.tar.gz
nng-ff66ec5f43547abc78b22ebcdfad32e2775bc9cb.tar.bz2
nng-ff66ec5f43547abc78b22ebcdfad32e2775bc9cb.zip
tcp/tls: Remove support for local interface address in dialer URLs
This was an undocumented capability provided for libnanomsg. The correct way to obtain the same functionality is to use `NNG_OPT_LOCADDR`.
Diffstat (limited to 'src/sp/transport/tcp/tcp_test.c')
-rw-r--r--src/sp/transport/tcp/tcp_test.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/sp/transport/tcp/tcp_test.c b/src/sp/transport/tcp/tcp_test.c
index ac2d6be9..57c612b7 100644
--- a/src/sp/transport/tcp/tcp_test.c
+++ b/src/sp/transport/tcp/tcp_test.c
@@ -47,27 +47,6 @@ test_tcp_wild_card_bind(void)
}
void
-test_tcp_local_address_connect(void)
-{
-
- nng_socket s1;
- nng_socket s2;
- char addr[NNG_MAXADDRLEN];
- uint16_t port;
-
- NUTS_OPEN(s1);
- NUTS_OPEN(s2);
- port = nuts_next_port();
- (void) snprintf(addr, sizeof(addr), "tcp://127.0.0.1:%u", port);
- NUTS_PASS(nng_listen(s1, addr, NULL, 0));
- (void) snprintf(
- addr, sizeof(addr), "tcp://127.0.0.1;127.0.0.1:%u", port);
- NUTS_PASS(nng_dial(s2, addr, NULL, 0));
- NUTS_CLOSE(s2);
- NUTS_CLOSE(s1);
-}
-
-void
test_tcp_port_zero_bind(void)
{
nng_socket s1;
@@ -92,19 +71,6 @@ test_tcp_port_zero_bind(void)
}
void
-test_tcp_bad_local_interface(void)
-{
- nng_socket s1;
- int rv;
-
- NUTS_OPEN(s1);
- rv = nng_dial(s1, "tcp://bogus1;127.0.0.1:80", NULL, 0),
- NUTS_TRUE(rv != 0);
- NUTS_TRUE(rv != NNG_ECONNREFUSED);
- NUTS_CLOSE(s1);
-}
-
-void
test_tcp_non_local_address(void)
{
nng_socket s1;
@@ -244,8 +210,6 @@ NUTS_TESTS = {
{ "tcp wild card connect fail", test_tcp_wild_card_connect_fail },
{ "tcp wild card bind", test_tcp_wild_card_bind },
{ "tcp port zero bind", test_tcp_port_zero_bind },
- { "tcp local address connect", test_tcp_local_address_connect },
- { "tcp bad local interface", test_tcp_bad_local_interface },
{ "tcp non-local address", test_tcp_non_local_address },
{ "tcp malformed address", test_tcp_malformed_address },
{ "tcp no delay option", test_tcp_no_delay_option },