diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/Makefile.am | 8 | ||||
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 16 | ||||
-rw-r--r-- | src/transport/gnunet-service-tng.c | 20 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 4 | ||||
-rwxr-xr-x | src/transport/test_transport_simple_send.sh | 7 | ||||
-rwxr-xr-x | src/transport/test_transport_simple_send_broadcast.sh | 8 | ||||
-rwxr-xr-x | src/transport/test_transport_simple_send_dv.sh | 8 | ||||
-rwxr-xr-x | src/transport/test_transport_simple_send_dv_circle.sh | 9 | ||||
-rwxr-xr-x | src/transport/test_transport_simple_send_string.sh | 8 | ||||
-rwxr-xr-x | src/transport/test_transport_udp_backchannel.sh | 9 |
10 files changed, 52 insertions, 45 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index ec00bc917..69b05fb13 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -773,6 +773,8 @@ TESTS += \ | |||
773 | endif | 773 | endif |
774 | endif | 774 | endif |
775 | 775 | ||
776 | # Only test TNG if we run experimental | ||
777 | if HAVE_EXPERIMENTAL | ||
776 | check_SCRIPTS= \ | 778 | check_SCRIPTS= \ |
777 | test_transport_simple_send_string.sh \ | 779 | test_transport_simple_send_string.sh \ |
778 | test_transport_simple_send.sh \ | 780 | test_transport_simple_send.sh \ |
@@ -780,6 +782,7 @@ check_SCRIPTS= \ | |||
780 | test_transport_udp_backchannel.sh \ | 782 | test_transport_udp_backchannel.sh \ |
781 | test_transport_simple_send_dv_circle.sh | 783 | test_transport_simple_send_dv_circle.sh |
782 | # test_transport_simple_send_dv_inverse.sh | 784 | # test_transport_simple_send_dv_inverse.sh |
785 | endif | ||
783 | 786 | ||
784 | test_transport_start_with_config_SOURCES = \ | 787 | test_transport_start_with_config_SOURCES = \ |
785 | test_transport_start_with_config.c | 788 | test_transport_start_with_config.c |
@@ -1521,7 +1524,10 @@ test_transport_api_slow_ats_LDADD = \ | |||
1521 | 1524 | ||
1522 | 1525 | ||
1523 | EXTRA_DIST = \ | 1526 | EXTRA_DIST = \ |
1524 | $(check_SCRIPTS) \ | 1527 | test_transport_simple_send_string.sh \ |
1528 | test_transport_simple_send.sh \ | ||
1529 | test_transport_simple_send_broadcast.sh \ | ||
1530 | test_transport_udp_backchannel.sh \ | ||
1525 | gnunet-transport-certificate-creation.in \ | 1531 | gnunet-transport-certificate-creation.in \ |
1526 | communicator-unix.conf \ | 1532 | communicator-unix.conf \ |
1527 | test_plugin_hostkey \ | 1533 | test_plugin_hostkey \ |
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index 3bfdeaa90..be75fa0e8 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -143,7 +143,7 @@ struct TcpHandshakeSignature | |||
143 | /** | 143 | /** |
144 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. | 144 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. |
145 | */ | 145 | */ |
146 | struct ChallengeNonceP challenge; | 146 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
147 | }; | 147 | }; |
148 | 148 | ||
149 | /** | 149 | /** |
@@ -176,7 +176,7 @@ struct TcpHandshakeAckSignature | |||
176 | /** | 176 | /** |
177 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. | 177 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. |
178 | */ | 178 | */ |
179 | struct ChallengeNonceP challenge; | 179 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
180 | }; | 180 | }; |
181 | 181 | ||
182 | /** | 182 | /** |
@@ -203,7 +203,7 @@ struct TCPConfirmation | |||
203 | /** | 203 | /** |
204 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. | 204 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. |
205 | */ | 205 | */ |
206 | struct ChallengeNonceP challenge; | 206 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
207 | 207 | ||
208 | }; | 208 | }; |
209 | 209 | ||
@@ -238,7 +238,7 @@ struct TCPConfirmationAck | |||
238 | /** | 238 | /** |
239 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. | 239 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. |
240 | */ | 240 | */ |
241 | struct ChallengeNonceP challenge; | 241 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
242 | 242 | ||
243 | }; | 243 | }; |
244 | 244 | ||
@@ -587,12 +587,12 @@ struct Queue | |||
587 | /** | 587 | /** |
588 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. | 588 | * Challenge value used to protect against replay attack, if there is no stored monotonic time value. |
589 | */ | 589 | */ |
590 | struct ChallengeNonceP challenge; | 590 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
591 | 591 | ||
592 | /** | 592 | /** |
593 | * Challenge value received. In case of inbound connection we have to remember the value, because we send the challenge back later after we received the GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_CONFIRMATION_ACK. | 593 | * Challenge value received. In case of inbound connection we have to remember the value, because we send the challenge back later after we received the GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_CONFIRMATION_ACK. |
594 | */ | 594 | */ |
595 | struct ChallengeNonceP challenge_received; | 595 | struct GNUNET_CRYPTO_ChallengeNonceP challenge_received; |
596 | 596 | ||
597 | /** | 597 | /** |
598 | * Iteration Context for retrieving the monotonic time send with key for rekeying. | 598 | * Iteration Context for retrieving the monotonic time send with key for rekeying. |
@@ -1447,7 +1447,7 @@ handshake_ack_monotime_cb (void *cls, | |||
1447 | * @param queue The queue context. | 1447 | * @param queue The queue context. |
1448 | */ | 1448 | */ |
1449 | static void | 1449 | static void |
1450 | send_challenge (struct ChallengeNonceP challenge, struct Queue *queue) | 1450 | send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, struct Queue *queue) |
1451 | { | 1451 | { |
1452 | struct TCPConfirmationAck tca; | 1452 | struct TCPConfirmationAck tca; |
1453 | struct TcpHandshakeAckSignature thas; | 1453 | struct TcpHandshakeAckSignature thas; |
@@ -1680,7 +1680,7 @@ try_handle_plaintext (struct Queue *queue) | |||
1680 | uint16_t type; | 1680 | uint16_t type; |
1681 | size_t size = 0; /* make compiler happy */ | 1681 | size_t size = 0; /* make compiler happy */ |
1682 | struct TcpHandshakeAckSignature thas; | 1682 | struct TcpHandshakeAckSignature thas; |
1683 | const struct ChallengeNonceP challenge = queue->challenge; | 1683 | const struct GNUNET_CRYPTO_ChallengeNonceP challenge = queue->challenge; |
1684 | 1684 | ||
1685 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1685 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1686 | "try handle plaintext!\n"); | 1686 | "try handle plaintext!\n"); |
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index 0427bd229..21c9be05c 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -581,7 +581,7 @@ struct DvInitPS | |||
581 | /** | 581 | /** |
582 | * Challenge value used by the initiator to re-identify the path. | 582 | * Challenge value used by the initiator to re-identify the path. |
583 | */ | 583 | */ |
584 | struct ChallengeNonceP challenge; | 584 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
585 | }; | 585 | }; |
586 | 586 | ||
587 | 587 | ||
@@ -621,7 +621,7 @@ struct DvHopPS | |||
621 | /** | 621 | /** |
622 | * Challenge value used by the initiator to re-identify the path. | 622 | * Challenge value used by the initiator to re-identify the path. |
623 | */ | 623 | */ |
624 | struct ChallengeNonceP challenge; | 624 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
625 | }; | 625 | }; |
626 | 626 | ||
627 | 627 | ||
@@ -715,7 +715,7 @@ struct TransportDVLearnMessage | |||
715 | /** | 715 | /** |
716 | * Challenge value used by the initiator to re-identify the path. | 716 | * Challenge value used by the initiator to re-identify the path. |
717 | */ | 717 | */ |
718 | struct ChallengeNonceP challenge; | 718 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
719 | 719 | ||
720 | /* Followed by @e num_hops `struct DVPathEntryP` values, | 720 | /* Followed by @e num_hops `struct DVPathEntryP` values, |
721 | excluding the initiator of the DV trace; the last entry is the | 721 | excluding the initiator of the DV trace; the last entry is the |
@@ -834,7 +834,7 @@ struct TransportValidationChallengeMessage | |||
834 | /** | 834 | /** |
835 | * Challenge to be signed by the receiving peer. | 835 | * Challenge to be signed by the receiving peer. |
836 | */ | 836 | */ |
837 | struct ChallengeNonceP challenge; | 837 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
838 | 838 | ||
839 | /** | 839 | /** |
840 | * Timestamp of the sender, to be copied into the reply to allow | 840 | * Timestamp of the sender, to be copied into the reply to allow |
@@ -864,7 +864,7 @@ struct TransportValidationPS | |||
864 | /** | 864 | /** |
865 | * Challenge signed by the receiving peer. | 865 | * Challenge signed by the receiving peer. |
866 | */ | 866 | */ |
867 | struct ChallengeNonceP challenge; | 867 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
868 | }; | 868 | }; |
869 | 869 | ||
870 | 870 | ||
@@ -893,7 +893,7 @@ struct TransportValidationResponseMessage | |||
893 | /** | 893 | /** |
894 | * The challenge that was signed by the receiving peer. | 894 | * The challenge that was signed by the receiving peer. |
895 | */ | 895 | */ |
896 | struct ChallengeNonceP challenge; | 896 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
897 | 897 | ||
898 | /** | 898 | /** |
899 | * Original timestamp of the sender (was @code{sender_time}), | 899 | * Original timestamp of the sender (was @code{sender_time}), |
@@ -1056,7 +1056,7 @@ struct LearnLaunchEntry | |||
1056 | /** | 1056 | /** |
1057 | * Challenge that uniquely identifies this activity. | 1057 | * Challenge that uniquely identifies this activity. |
1058 | */ | 1058 | */ |
1059 | struct ChallengeNonceP challenge; | 1059 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
1060 | 1060 | ||
1061 | /** | 1061 | /** |
1062 | * When did we transmit the DV learn message (used to calculate RTT) and | 1062 | * When did we transmit the DV learn message (used to calculate RTT) and |
@@ -2569,7 +2569,7 @@ struct ValidationState | |||
2569 | * (We must not rotate more often as otherwise we may discard valid answers | 2569 | * (We must not rotate more often as otherwise we may discard valid answers |
2570 | * due to packet losses, latency and reorderings on the network). | 2570 | * due to packet losses, latency and reorderings on the network). |
2571 | */ | 2571 | */ |
2572 | struct ChallengeNonceP challenge; | 2572 | struct GNUNET_CRYPTO_ChallengeNonceP challenge; |
2573 | 2573 | ||
2574 | /** | 2574 | /** |
2575 | * Claimed address of the peer. | 2575 | * Claimed address of the peer. |
@@ -6886,7 +6886,7 @@ static int | |||
6886 | validate_dv_initiator_signature ( | 6886 | validate_dv_initiator_signature ( |
6887 | struct GNUNET_TIME_AbsoluteNBO sender_monotonic_time, | 6887 | struct GNUNET_TIME_AbsoluteNBO sender_monotonic_time, |
6888 | const struct GNUNET_PeerIdentity *init, | 6888 | const struct GNUNET_PeerIdentity *init, |
6889 | const struct ChallengeNonceP *challenge, | 6889 | const struct GNUNET_CRYPTO_ChallengeNonceP *challenge, |
6890 | const struct GNUNET_CRYPTO_EddsaSignature *init_sig) | 6890 | const struct GNUNET_CRYPTO_EddsaSignature *init_sig) |
6891 | { | 6891 | { |
6892 | struct DvInitPS ip = { .purpose.purpose = htonl ( | 6892 | struct DvInitPS ip = { .purpose.purpose = htonl ( |
@@ -8340,7 +8340,7 @@ struct CheckKnownChallengeContext | |||
8340 | /** | 8340 | /** |
8341 | * Set to the challenge we are looking for. | 8341 | * Set to the challenge we are looking for. |
8342 | */ | 8342 | */ |
8343 | const struct ChallengeNonceP *challenge; | 8343 | const struct GNUNET_CRYPTO_ChallengeNonceP *challenge; |
8344 | 8344 | ||
8345 | /** | 8345 | /** |
8346 | * Set to a matching validation state, if one was found. | 8346 | * Set to a matching validation state, if one was found. |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 24cc6464a..fad2ca4a1 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1628,8 +1628,8 @@ GST_receive_callback (void *cls, | |||
1628 | GST_neighbours_notify_data_recv (address, message); | 1628 | GST_neighbours_notify_data_recv (address, message); |
1629 | switch (type) | 1629 | switch (type) |
1630 | { | 1630 | { |
1631 | case GNUNET_MESSAGE_TYPE_HELLO_LEGACY: | 1631 | case GNUNET_MESSAGE_TYPE_HELLO_URI: |
1632 | /* Legacy HELLO message, discard */ | 1632 | /* Future HELLO message, discard */ |
1633 | return ret; | 1633 | return ret; |
1634 | 1634 | ||
1635 | case GNUNET_MESSAGE_TYPE_HELLO: | 1635 | case GNUNET_MESSAGE_TYPE_HELLO: |
diff --git a/src/transport/test_transport_simple_send.sh b/src/transport/test_transport_simple_send.sh index 3d5266622..0250070be 100755 --- a/src/transport/test_transport_simple_send.sh +++ b/src/transport/test_transport_simple_send.sh | |||
@@ -2,9 +2,10 @@ | |||
2 | if ! [ -d "/run/netns" ]; then | 2 | if ! [ -d "/run/netns" ]; then |
3 | echo You have to create the directory /run/netns. | 3 | echo You have to create the directory /run/netns. |
4 | fi | 4 | fi |
5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 5 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
6 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_topo.conf" | 6 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
7 | else | ||
8 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 7 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
9 | exit 78 | 8 | exit 78 |
9 | fi | ||
10 | fi | 10 | fi |
11 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_topo.conf" | ||
diff --git a/src/transport/test_transport_simple_send_broadcast.sh b/src/transport/test_transport_simple_send_broadcast.sh index f264b1203..a4801bf70 100755 --- a/src/transport/test_transport_simple_send_broadcast.sh +++ b/src/transport/test_transport_simple_send_broadcast.sh | |||
@@ -2,10 +2,10 @@ | |||
2 | if ! [ -d "/run/netns" ]; then | 2 | if ! [ -d "/run/netns" ]; then |
3 | echo You have to create the directory /run/netns. | 3 | echo You have to create the directory /run/netns. |
4 | fi | 4 | fi |
5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 5 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
6 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip/sed/bash ./test_transport_start_with_config test_transport_simple_send_broadcast_topo.conf" | 6 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
7 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_broadcast_topo.conf" | ||
8 | else | ||
9 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 7 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
10 | exit 78 | 8 | exit 78 |
9 | fi | ||
11 | fi | 10 | fi |
11 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_broadcast_topo.conf" | ||
diff --git a/src/transport/test_transport_simple_send_dv.sh b/src/transport/test_transport_simple_send_dv.sh index fa127cfa4..b57ee0629 100755 --- a/src/transport/test_transport_simple_send_dv.sh +++ b/src/transport/test_transport_simple_send_dv.sh | |||
@@ -2,10 +2,10 @@ | |||
2 | if ! [ -d "/run/netns" ]; then | 2 | if ! [ -d "/run/netns" ]; then |
3 | echo You have to create the directory /run/netns. | 3 | echo You have to create the directory /run/netns. |
4 | fi | 4 | fi |
5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 5 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
6 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip/sed/bash ./test_transport_start_with_config test_transport_distance_vector_topo.conf" | 6 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
7 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_distance_vector_topo.conf" | ||
8 | else | ||
9 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 7 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
10 | exit 78 | 8 | exit 78 |
9 | fi | ||
11 | fi | 10 | fi |
11 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_distance_vector_topo.conf" | ||
diff --git a/src/transport/test_transport_simple_send_dv_circle.sh b/src/transport/test_transport_simple_send_dv_circle.sh index de16df356..bd5f00abe 100755 --- a/src/transport/test_transport_simple_send_dv_circle.sh +++ b/src/transport/test_transport_simple_send_dv_circle.sh | |||
@@ -2,11 +2,10 @@ | |||
2 | if ! [ -d "/run/netns" ]; then | 2 | if ! [ -d "/run/netns" ]; then |
3 | echo You have to create the directory /run/netns. | 3 | echo You have to create the directory /run/netns. |
4 | fi | 4 | fi |
5 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 5 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
6 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip/sed/bash ./test_transport_start_with_config test_transport_distance_vector_topo.conf" | 6 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
7 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_distance_vector_circle_topo.conf" | ||
8 | #./test_transport_start_with_config test_transport_distance_vector_circle_topo.conf | ||
9 | else | ||
10 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 7 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
11 | exit 78 | 8 | exit 78 |
9 | fi | ||
12 | fi | 10 | fi |
11 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_distance_vector_circle_topo.conf" | ||
diff --git a/src/transport/test_transport_simple_send_string.sh b/src/transport/test_transport_simple_send_string.sh index b2bd05d5f..211abb494 100755 --- a/src/transport/test_transport_simple_send_string.sh +++ b/src/transport/test_transport_simple_send_string.sh | |||
@@ -11,9 +11,11 @@ EOF | |||
11 | if ! [ -d "/run/netns" ]; then | 11 | if ! [ -d "/run/netns" ]; then |
12 | echo You have to create the directory /run/netns. | 12 | echo You have to create the directory /run/netns. |
13 | fi | 13 | fi |
14 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 14 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
15 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" | 15 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
16 | else | ||
17 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 16 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
18 | exit 78 | 17 | exit 78 |
18 | fi | ||
19 | fi | 19 | fi |
20 | |||
21 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" | ||
diff --git a/src/transport/test_transport_udp_backchannel.sh b/src/transport/test_transport_udp_backchannel.sh index c52734a55..1a7c83385 100755 --- a/src/transport/test_transport_udp_backchannel.sh +++ b/src/transport/test_transport_udp_backchannel.sh | |||
@@ -5,11 +5,10 @@ fi | |||
5 | if ! [ -d "/run/netns" ]; then | 5 | if ! [ -d "/run/netns" ]; then |
6 | echo You have to create the directory /run/netns. | 6 | echo You have to create the directory /run/netns. |
7 | fi | 7 | fi |
8 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then | 8 | if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then |
9 | #exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | 9 | if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then |
10 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; GNUNET_FORCE_LOG=';;;;DEBUG' GNUNET_FORCE_LOGFILE='test.out' ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | ||
11 | # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | ||
12 | else | ||
13 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" | 10 | echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" |
14 | exit 78 | 11 | exit 78 |
12 | fi | ||
15 | fi | 13 | fi |
14 | exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; GNUNET_FORCE_LOG=';;;;DEBUG' GNUNET_FORCE_LOGFILE='test.out' ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" | ||