Skip to content

Commit 5ecf11f

Browse files
committed
Refs #20629: Use whitelist to avoid interfaces translation problem
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
1 parent 3bd6c27 commit 5ecf11f

3 files changed

Lines changed: 25 additions & 5 deletions

File tree

test/configuration/test_cases/test_95_tcpv4_cli.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<DS xmlns="http://www.eprosima.com/XMLSchemas/discovery-server" user_shutdown="false">
33

4+
<!-- In order to avoid extra channel connections between TCP participants
5+
we will use the whitelist to force the clients to send their locators
6+
with localhost. Otherwise, the server would not reuse the initial
7+
channel created and it might cause a failure in the connection,
8+
depending of the value of the random logical port assigned.
9+
This could be avoided by using default GUIDs. -->
10+
411
<clients>
512
<client name="client1" profile_name="TCPv4_client_1" listening_port="0">
613
<subscriber topic="topic1"/>
@@ -21,15 +28,21 @@
2128
<transport_id>transport_client_1</transport_id>
2229
<type>TCPv4</type>
2330
<listening_ports>
24-
<port>42101</port>
31+
<port>0</port>
2532
</listening_ports>
33+
<interfaceWhiteList>
34+
<address>lo</address>
35+
</interfaceWhiteList>
2636
</transport_descriptor>
2737
<transport_descriptor>
2838
<transport_id>transport_client_2</transport_id>
2939
<type>TCPv4</type>
3040
<listening_ports>
31-
<port>42102</port>
41+
<port>0</port>
3242
</listening_ports>
43+
<interfaceWhiteList>
44+
<address>lo</address>
45+
</interfaceWhiteList>
3346
</transport_descriptor>
3447
</transport_descriptors>
3548

test/configuration/test_cases/test_96_tcpv6_cli.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@
2121
<transport_id>transport_client_1</transport_id>
2222
<type>TCPv6</type>
2323
<listening_ports>
24-
<port>42101</port>
24+
<port>0</port>
2525
</listening_ports>
26+
<interfaceWhiteList>
27+
<address>::1</address>
28+
</interfaceWhiteList>
2629
</transport_descriptor>
2730
<transport_descriptor>
2831
<transport_id>transport_client_2</transport_id>
2932
<type>TCPv6</type>
3033
<listening_ports>
31-
<port>42102</port>
34+
<port>0</port>
3235
</listening_ports>
36+
<interfaceWhiteList>
37+
<address>::1</address>
38+
</interfaceWhiteList>
3339
</transport_descriptor>
3440
</transport_descriptors>
3541

test/configuration/test_cases/test_98_tcpv6_env_var.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
we will use the whitelist to force the clients to send their locators
66
with localhost. Otherwise, the server would not reuse the initial
77
channel created and it might cause a failure in the connection,
8-
depending of the value of the random logical port assigned. -->
8+
depending of the value of the random logical port assigned.
9+
This could be avoided by using default GUIDs. -->
910

1011
<servers>
1112
<server name="server" profile_name="TCPv6_server"/>

0 commit comments

Comments
 (0)