diff options
author | t3sserakt <t3ss@posteo.de> | 2023-01-18 10:00:47 +0100 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2023-01-18 10:00:47 +0100 |
commit | c524f91a6250a2b22da30cd7efbec817c2d8568d (patch) | |
tree | 4e4d0a34d3eea8166025379bd3b989a869806fa0 | |
parent | 8e1bf27b112d8b46230336305f523393590cc575 (diff) | |
download | gnunet-c524f91a6250a2b22da30cd7efbec817c2d8568d.tar.gz gnunet-c524f91a6250a2b22da30cd7efbec817c2d8568d.zip |
TNG: miniupnpd only works with public IP addresses.
-rwxr-xr-x | contrib/netjail/netjail_start.sh | 13 | ||||
-rw-r--r-- | src/testing/gnunet-cmds-helper.c | 12 | ||||
-rw-r--r-- | src/testing/testing.c | 12 |
3 files changed, 35 insertions, 2 deletions
diff --git a/contrib/netjail/netjail_start.sh b/contrib/netjail/netjail_start.sh index 6036ecbdc..e68745746 100755 --- a/contrib/netjail/netjail_start.sh +++ b/contrib/netjail/netjail_start.sh | |||
@@ -24,8 +24,17 @@ fi | |||
24 | shift 2 | 24 | shift 2 |
25 | 25 | ||
26 | LOCAL_GROUP="192.168.15" | 26 | LOCAL_GROUP="192.168.15" |
27 | GLOBAL_GROUP="172.16.150" | 27 | GLOBAL_GROUP="92.68.150" |
28 | KNOWN_GROUP="172.16.151" | 28 | KNOWN_GROUP="92.68.151" |
29 | # Use the IP addresses below instead of the public ones, | ||
30 | # if the script was not started from within a new namespace | ||
31 | # created by unshare. The UPNP test case needs public IP | ||
32 | # addresse for miniupnpd to function. | ||
33 | # FIXME The ip addresses are used in the c code too. We should | ||
34 | # introduce a switch indicating if public addresses should be | ||
35 | # used or not. This info has to be propagated to the c code. | ||
36 | #GLOBAL_GROUP="172.16.150" | ||
37 | #KNOWN_GROUP="172.16.151" | ||
29 | 38 | ||
30 | if [ $BROADCAST -eq 0 ]; then | 39 | if [ $BROADCAST -eq 0 ]; then |
31 | PORT="60002" | 40 | PORT="60002" |
diff --git a/src/testing/gnunet-cmds-helper.c b/src/testing/gnunet-cmds-helper.c index 90b686891..de50aca3a 100644 --- a/src/testing/gnunet-cmds-helper.c +++ b/src/testing/gnunet-cmds-helper.c | |||
@@ -61,9 +61,21 @@ | |||
61 | 61 | ||
62 | #define NODE_BASE_IP "192.168.15." | 62 | #define NODE_BASE_IP "192.168.15." |
63 | 63 | ||
64 | #define KNOWN_BASE_IP "92.68.151." | ||
65 | |||
66 | #define ROUTER_BASE_IP "92.68.150." | ||
67 | |||
68 | /* Use the IP addresses below instead of the public ones, | ||
69 | * if the start script was not started from within a new namespace | ||
70 | * created by unshare. The UPNP test case needs public IP | ||
71 | * addresse for miniupnpd to function. | ||
72 | * FIXME We should introduce a switch indicating if public | ||
73 | * addresses should be used or not. This info has to be | ||
74 | * propagated from the start script to the c code. | ||
64 | #define KNOWN_BASE_IP "172.16.151." | 75 | #define KNOWN_BASE_IP "172.16.151." |
65 | 76 | ||
66 | #define ROUTER_BASE_IP "172.16.150." | 77 | #define ROUTER_BASE_IP "172.16.150." |
78 | */ | ||
67 | 79 | ||
68 | struct GNUNET_SCHEDULER_Task *finished_task; | 80 | struct GNUNET_SCHEDULER_Task *finished_task; |
69 | 81 | ||
diff --git a/src/testing/testing.c b/src/testing/testing.c index f2bf68c08..a1161925b 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -43,9 +43,21 @@ | |||
43 | 43 | ||
44 | #define CONNECT_ADDRESS_TEMPLATE "%s-192.168.15.%u" | 44 | #define CONNECT_ADDRESS_TEMPLATE "%s-192.168.15.%u" |
45 | 45 | ||
46 | #define ROUTER_CONNECT_ADDRESS_TEMPLATE "%s-92.68.150.%u" | ||
47 | |||
48 | #define KNOWN_CONNECT_ADDRESS_TEMPLATE "%s-92.68.151.%u" | ||
49 | |||
50 | /* Use the IP addresses below instead of the public ones, | ||
51 | * if the start script was not started from within a new namespace | ||
52 | * created by unshare. The UPNP test case needs public IP | ||
53 | * addresse for miniupnpd to function. | ||
54 | * FIXME We should introduce a switch indicating if public | ||
55 | * addresses should be used or not. This info has to be | ||
56 | * propagated from the start script to the c code. | ||
46 | #define ROUTER_CONNECT_ADDRESS_TEMPLATE "%s-172.16.150.%u" | 57 | #define ROUTER_CONNECT_ADDRESS_TEMPLATE "%s-172.16.150.%u" |
47 | 58 | ||
48 | #define KNOWN_CONNECT_ADDRESS_TEMPLATE "%s-172.16.151.%u" | 59 | #define KNOWN_CONNECT_ADDRESS_TEMPLATE "%s-172.16.151.%u" |
60 | */ | ||
49 | 61 | ||
50 | #define PREFIX_TCP "tcp" | 62 | #define PREFIX_TCP "tcp" |
51 | 63 | ||