diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-14 16:00:15 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-02-14 16:00:15 +0100 |
commit | 336acc33010eb725c873791ed6eb9039cb1aedd2 (patch) | |
tree | e6f8bbbcc9cf6c3f7e133ba83f772e6cb7e518b1 /src/gns | |
parent | 6866469e6dd066cecef416afda3f119a958db1a8 (diff) | |
download | gnunet-336acc33010eb725c873791ed6eb9039cb1aedd2.tar.gz gnunet-336acc33010eb725c873791ed6eb9039cb1aedd2.zip |
GNS/NAMESTORE: Fix GNS2DNS delegations
Diffstat (limited to 'src/gns')
-rwxr-xr-x | src/gns/test_gns_gns2dns_cname_lookup.sh | 9 | ||||
-rwxr-xr-x | src/gns/test_gns_gns2dns_lookup.sh | 12 | ||||
-rwxr-xr-x | src/gns/test_gns_gns2dns_zkey_lookup.sh | 12 |
3 files changed, 20 insertions, 13 deletions
diff --git a/src/gns/test_gns_gns2dns_cname_lookup.sh b/src/gns/test_gns_gns2dns_cname_lookup.sh index ce1afacf4..9315f6b2f 100755 --- a/src/gns/test_gns_gns2dns_cname_lookup.sh +++ b/src/gns/test_gns_gns2dns_cname_lookup.sh | |||
@@ -16,9 +16,11 @@ fi | |||
16 | 16 | ||
17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 17 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
18 | # IP address of 'www.gnunet.org' | 18 | # IP address of 'www.gnunet.org' |
19 | TEST_IP="131.159.74.67" | 19 | TEST_IP="147.87.255.218" |
20 | # IP address of 'gnunet.org' | ||
21 | TEST_IPALT="131.159.74.67" | ||
20 | # IPv6 address of 'gnunet.org' | 22 | # IPv6 address of 'gnunet.org' |
21 | TEST_IP6="2001:4ca0:2001:42:225:90ff:fe6b:d60" | 23 | TEST_IP6="2a07:6b47:100:464::9357:ffdb" |
22 | 24 | ||
23 | # main label used during resolution | 25 | # main label used during resolution |
24 | TEST_RECORD_NAME="homepage" | 26 | TEST_RECORD_NAME="homepage" |
@@ -46,7 +48,7 @@ TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO" | |||
46 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" | 48 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" |
47 | 49 | ||
48 | gnunet-arm -s -c test_gns_lookup.conf | 50 | gnunet-arm -s -c test_gns_lookup.conf |
49 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` | 51 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf www.gnunet.org` |
50 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 52 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
51 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 53 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
52 | 54 | ||
@@ -59,6 +61,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECOR | |||
59 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS2 -e never -c test_gns_lookup.conf | 61 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS2 -e never -c test_gns_lookup.conf |
60 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS3 -e never -c test_gns_lookup.conf | 62 | gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS3 -e never -c test_gns_lookup.conf |
61 | 63 | ||
64 | gnunet-namestore -z $MY_EGO -D -c test_gns_lookup.conf | ||
62 | 65 | ||
63 | echo "EGOs:" | 66 | echo "EGOs:" |
64 | gnunet-identity -d | 67 | gnunet-identity -d |
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh index dcad594b3..6cb1cc43e 100755 --- a/src/gns/test_gns_gns2dns_lookup.sh +++ b/src/gns/test_gns_gns2dns_lookup.sh | |||
@@ -17,9 +17,11 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | |||
17 | # IP address of 'docs.gnunet.org' | 17 | # IP address of 'docs.gnunet.org' |
18 | TEST_IP_ALT2="147.87.255.218" | 18 | TEST_IP_ALT2="147.87.255.218" |
19 | # IP address of 'www.gnunet.org' | 19 | # IP address of 'www.gnunet.org' |
20 | TEST_IP="131.159.74.67" | 20 | TEST_IP="147.87.255.218" |
21 | # IP address of 'gnunet.org' | ||
22 | TEST_IP_ALT="131.159.74.67" | ||
21 | # IPv6 address of 'gnunet.org' | 23 | # IPv6 address of 'gnunet.org' |
22 | TEST_IP6="2001:4ca0:2001:42:225:90ff:fe6b:d60" | 24 | TEST_IP6="2a07:6b47:100:464::9357:ffdb" |
23 | # permissive DNS resolver we will use for the test | 25 | # permissive DNS resolver we will use for the test |
24 | TEST_IP_GNS2DNS="8.8.8.8" | 26 | TEST_IP_GNS2DNS="8.8.8.8" |
25 | 27 | ||
@@ -49,7 +51,7 @@ which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" | |||
49 | 51 | ||
50 | gnunet-arm -s -c test_gns_lookup.conf | 52 | gnunet-arm -s -c test_gns_lookup.conf |
51 | 53 | ||
52 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` | 54 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf www.gnunet.org` |
53 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 55 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
54 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 56 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
55 | 57 | ||
@@ -69,7 +71,7 @@ gnunet-identity -d | |||
69 | # lookup 'www.gnunet.org', IPv4 | 71 | # lookup 'www.gnunet.org', IPv4 |
70 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` | 72 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` |
71 | # lookup 'www.gnunet.org', IPv6 | 73 | # lookup 'www.gnunet.org', IPv6 |
72 | RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf` | 74 | RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf | head -n1` |
73 | # lookup 'gnunet.org', IPv4 | 75 | # lookup 'gnunet.org', IPv4 |
74 | RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` | 76 | RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` |
75 | # lookup 'docs.gnunet.org', IPv4 | 77 | # lookup 'docs.gnunet.org', IPv4 |
@@ -99,7 +101,7 @@ else | |||
99 | ret=1 | 101 | ret=1 |
100 | fi | 102 | fi |
101 | 103 | ||
102 | if echo "$RES_IP_ALT" | grep "$TEST_IP" > /dev/null | 104 | if echo "$RES_IP_ALT" | grep "$TEST_IP_ALT" > /dev/null |
103 | then | 105 | then |
104 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." | 106 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." |
105 | else | 107 | else |
diff --git a/src/gns/test_gns_gns2dns_zkey_lookup.sh b/src/gns/test_gns_gns2dns_zkey_lookup.sh index 1f8e34c42..c5a7fe4a0 100755 --- a/src/gns/test_gns_gns2dns_zkey_lookup.sh +++ b/src/gns/test_gns_gns2dns_zkey_lookup.sh | |||
@@ -17,9 +17,11 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | |||
17 | # IP address of 'docs.gnunet.org' | 17 | # IP address of 'docs.gnunet.org' |
18 | TEST_IP_ALT2="147.87.255.218" | 18 | TEST_IP_ALT2="147.87.255.218" |
19 | # IP address of 'www.gnunet.org' | 19 | # IP address of 'www.gnunet.org' |
20 | TEST_IP="131.159.74.67" | 20 | TEST_IP="147.87.255.218" |
21 | # IP address of 'www.gnunet.org' | ||
22 | TEST_IP_ALT="131.159.74.67" | ||
21 | # IPv6 address of 'gnunet.org' | 23 | # IPv6 address of 'gnunet.org' |
22 | TEST_IP6="2001:4ca0:2001:42:225:90ff:fe6b:d60" | 24 | TEST_IP6="2a07:6b47:100:464::9357:ffdb" |
23 | # permissive DNS resolver we will use for the test | 25 | # permissive DNS resolver we will use for the test |
24 | TEST_IP_GNS2DNS="8.8.8.8" | 26 | TEST_IP_GNS2DNS="8.8.8.8" |
25 | 27 | ||
@@ -46,7 +48,7 @@ which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" | |||
46 | 48 | ||
47 | gnunet-arm -s -c test_gns_lookup.conf | 49 | gnunet-arm -s -c test_gns_lookup.conf |
48 | 50 | ||
49 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` | 51 | OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf www.gnunet.org` |
50 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 52 | echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
51 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } | 53 | echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } |
52 | 54 | ||
@@ -66,7 +68,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECOR | |||
66 | # lookup 'www.gnunet.org', IPv4 | 68 | # lookup 'www.gnunet.org', IPv4 |
67 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` | 69 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` |
68 | # lookup 'www.gnunet.org', IPv6 | 70 | # lookup 'www.gnunet.org', IPv6 |
69 | RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf` | 71 | RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf | head -n1` |
70 | # lookup 'gnunet.org', IPv4 | 72 | # lookup 'gnunet.org', IPv4 |
71 | RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` | 73 | RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` |
72 | # lookup 'docs.gnunet.org', IPv4 | 74 | # lookup 'docs.gnunet.org', IPv4 |
@@ -96,7 +98,7 @@ else | |||
96 | ret=1 | 98 | ret=1 |
97 | fi | 99 | fi |
98 | 100 | ||
99 | if echo "$RES_IP_ALT" | grep "$TEST_IP" > /dev/null | 101 | if echo "$RES_IP_ALT" | grep "$TEST_IP_ALT" > /dev/null |
100 | then | 102 | then |
101 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." | 103 | echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." |
102 | else | 104 | else |