aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/gns/test_gns_at_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_caa_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_delegated_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_gns2dns_cname_lookup.sh3
-rwxr-xr-xsrc/gns/test_gns_gns2dns_lookup.sh4
-rwxr-xr-xsrc/gns/test_gns_gns2dns_zkey_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_ipv6_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_mx_lookup.sh2
-rwxr-xr-xsrc/gns/test_gns_redirect_lookup.sh2
-rwxr-xr-xsrc/gns/test_gns_rel_expiration.sh1
-rwxr-xr-xsrc/gns/test_gns_revocation.sh1
-rwxr-xr-xsrc/gns/test_gns_soa_lookup.sh1
-rwxr-xr-xsrc/gns/test_gns_txt_lookup.sh1
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c26
15 files changed, 28 insertions, 19 deletions
diff --git a/src/gns/test_gns_at_lookup.sh b/src/gns/test_gns_at_lookup.sh
index 998bca700..6a2c958de 100755
--- a/src/gns/test_gns_at_lookup.sh
+++ b/src/gns/test_gns_at_lookup.sh
@@ -25,6 +25,7 @@ DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego
25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
26gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 26gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
27gnunet-namestore -p -z delegatedego -a -n '@' -t A -V $TEST_IP -e never -c test_gns_lookup.conf 27gnunet-namestore -p -z delegatedego -a -n '@' -t A -V $TEST_IP -e never -c test_gns_lookup.conf
28sleep 0.5
28RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u b.$MY_EGO -t A -c test_gns_lookup.conf` 29RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u b.$MY_EGO -t A -c test_gns_lookup.conf`
29gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 30gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
30gnunet-namestore -z delegatedego -d -n '@' -t A -V $TEST_IP -e never -c test_gns_lookup.conf 31gnunet-namestore -z delegatedego -d -n '@' -t A -V $TEST_IP -e never -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_caa_lookup.sh b/src/gns/test_gns_caa_lookup.sh
index 043a1a937..fb488f47b 100755
--- a/src/gns/test_gns_caa_lookup.sh
+++ b/src/gns/test_gns_caa_lookup.sh
@@ -22,6 +22,7 @@ LABEL="testcaa"
22gnunet-arm -s -c test_gns_lookup.conf 22gnunet-arm -s -c test_gns_lookup.conf
23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t CAA -V "$TEST_CAA" -e never -c test_gns_lookup.conf 24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t CAA -V "$TEST_CAA" -e never -c test_gns_lookup.conf
25sleep 0.5
25RES_CAA=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t CAA -c test_gns_lookup.conf` 26RES_CAA=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t CAA -c test_gns_lookup.conf`
26gnunet-namestore -z $MY_EGO -d -n $LABEL -t CAA -V "$TEST_CAA" -e never -c test_gns_lookup.conf 27gnunet-namestore -z $MY_EGO -d -n $LABEL -t CAA -V "$TEST_CAA" -e never -c test_gns_lookup.conf
27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 28gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_delegated_lookup.sh b/src/gns/test_gns_delegated_lookup.sh
index c4885820d..5105abdb5 100755
--- a/src/gns/test_gns_delegated_lookup.sh
+++ b/src/gns/test_gns_delegated_lookup.sh
@@ -28,6 +28,7 @@ DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO |
28gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 28gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
29gnunet-namestore -p -z $MY_EGO -a -n $DELEGATION_LABEL -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 29gnunet-namestore -p -z $MY_EGO -a -n $DELEGATION_LABEL -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
30gnunet-namestore -p -z $OTHER_EGO -a -n $FINAL_LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf 30gnunet-namestore -p -z $OTHER_EGO -a -n $FINAL_LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf
31sleep 0.5
31RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $FINAL_LABEL.$DELEGATION_LABEL.$MY_EGO -t A -c test_gns_lookup.conf` 32RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $FINAL_LABEL.$DELEGATION_LABEL.$MY_EGO -t A -c test_gns_lookup.conf`
32gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 33gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
33gnunet-namestore -z $OTHER_EGO -d -n $FINAL_LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf 34gnunet-namestore -z $OTHER_EGO -d -n $FINAL_LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_gns2dns_cname_lookup.sh b/src/gns/test_gns_gns2dns_cname_lookup.sh
index 9315f6b2f..c33c9d132 100755
--- a/src/gns/test_gns_gns2dns_cname_lookup.sh
+++ b/src/gns/test_gns_gns2dns_cname_lookup.sh
@@ -63,8 +63,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECOR
63 63
64gnunet-namestore -z $MY_EGO -D -c test_gns_lookup.conf 64gnunet-namestore -z $MY_EGO -D -c test_gns_lookup.conf
65 65
66echo "EGOs:" 66sleep 0.5
67gnunet-identity -d
68 67
69# lookup 'www.gnunet.org', IPv4 68# lookup 'www.gnunet.org', IPv4
70RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` 69RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf`
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh
index 240e441a4..9419330e6 100755
--- a/src/gns/test_gns_gns2dns_lookup.sh
+++ b/src/gns/test_gns_gns2dns_lookup.sh
@@ -64,9 +64,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RESOLVER_LABEL -t A -V $TEST_IP_GNS2D
64# map '$TEST_RECORD_NAME.$MY_EGO' to 'gnunet.org' in DNS 64# map '$TEST_RECORD_NAME.$MY_EGO' to 'gnunet.org' in DNS
65gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf 65gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf
66 66
67 67sleep 1
68echo "EGOs:"
69gnunet-identity -d
70 68
71# lookup 'www.gnunet.org', IPv4 69# lookup 'www.gnunet.org', IPv4
72RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` 70RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf`
diff --git a/src/gns/test_gns_gns2dns_zkey_lookup.sh b/src/gns/test_gns_gns2dns_zkey_lookup.sh
index a299c34b6..ee3f3a748 100755
--- a/src/gns/test_gns_gns2dns_zkey_lookup.sh
+++ b/src/gns/test_gns_gns2dns_zkey_lookup.sh
@@ -65,6 +65,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RESOLVER_LABEL -t A -V $TEST_IP_GNS2D
65# map '$TEST_RECORD_NAME.$MY_EGO' to 'gnunet.org' in DNS 65# map '$TEST_RECORD_NAME.$MY_EGO' to 'gnunet.org' in DNS
66gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf 66gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECORD_GNS2DNS -e never -c test_gns_lookup.conf
67 67
68sleep 1
68# lookup 'www.gnunet.org', IPv4 69# lookup 'www.gnunet.org', IPv4
69RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` 70RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf`
70# lookup 'www.gnunet.org', IPv6 71# lookup 'www.gnunet.org', IPv6
diff --git a/src/gns/test_gns_ipv6_lookup.sh b/src/gns/test_gns_ipv6_lookup.sh
index 9766ac902..31e662f68 100755
--- a/src/gns/test_gns_ipv6_lookup.sh
+++ b/src/gns/test_gns_ipv6_lookup.sh
@@ -21,6 +21,7 @@ TEST_IP="dead::beef"
21gnunet-arm -s -c test_gns_lookup.conf 21gnunet-arm -s -c test_gns_lookup.conf
22gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 22gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
23gnunet-namestore -p -z $MY_EGO -a -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf 23gnunet-namestore -p -z $MY_EGO -a -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf
24sleep 0.5
24RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.$MY_EGO -t AAAA -c test_gns_lookup.conf` 25RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.$MY_EGO -t AAAA -c test_gns_lookup.conf`
25gnunet-namestore -z $MY_EGO -d -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf 26gnunet-namestore -z $MY_EGO -d -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf
26gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh
index fe273b2a3..92dfae28b 100755
--- a/src/gns/test_gns_lookup.sh
+++ b/src/gns/test_gns_lookup.sh
@@ -22,6 +22,7 @@ LABEL="www"
22gnunet-arm -s -c test_gns_lookup.conf 22gnunet-arm -s -c test_gns_lookup.conf
23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf 24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf
25sleep 0.5
25RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t A -c test_gns_lookup.conf` 26RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t A -c test_gns_lookup.conf`
26gnunet-namestore -z $MY_EGO -d -n $LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf 27gnunet-namestore -z $MY_EGO -d -n $LABEL -t A -V $TEST_IP -e never -c test_gns_lookup.conf
27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 28gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_mx_lookup.sh b/src/gns/test_gns_mx_lookup.sh
index ffbe5a1b6..6f2b8192d 100755
--- a/src/gns/test_gns_mx_lookup.sh
+++ b/src/gns/test_gns_mx_lookup.sh
@@ -24,7 +24,7 @@ gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
24PKEY=`gnunet-identity -d | grep "$MY_EGO - " | awk '{print $3'}` 24PKEY=`gnunet-identity -d | grep "$MY_EGO - " | awk '{print $3'}`
25WANT_MX="5 mail.$PKEY" 25WANT_MX="5 mail.$PKEY"
26gnunet-namestore -p -z $MY_EGO -a -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf 26gnunet-namestore -p -z $MY_EGO -a -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf
27 27sleep 0.5
28RES_MX=`$DO_TIMEOUT gnunet-gns --raw -u www.$MY_EGO -t MX -c test_gns_lookup.conf` 28RES_MX=`$DO_TIMEOUT gnunet-gns --raw -u www.$MY_EGO -t MX -c test_gns_lookup.conf`
29gnunet-namestore -z $MY_EGO -d -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf 29gnunet-namestore -z $MY_EGO -d -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf
30gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 30gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_redirect_lookup.sh b/src/gns/test_gns_redirect_lookup.sh
index dfe5087ef..4ee5c0e3e 100755
--- a/src/gns/test_gns_redirect_lookup.sh
+++ b/src/gns/test_gns_redirect_lookup.sh
@@ -48,7 +48,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME_DNS -t REDIRECT -V $TEST_
48gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME_PLUS -t REDIRECT -V $TEST_RECORD_REDIRECT_PLUS -e never -c test_gns_lookup.conf 48gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME_PLUS -t REDIRECT -V $TEST_RECORD_REDIRECT_PLUS -e never -c test_gns_lookup.conf
49gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME_ZKEY -t REDIRECT -V $TEST_RECORD_REDIRECT_ZKEY -e never -c test_gns_lookup.conf 49gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME_ZKEY -t REDIRECT -V $TEST_RECORD_REDIRECT_ZKEY -e never -c test_gns_lookup.conf
50gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_REDIRECT_SERVER -t A -V $TEST_IP_PLUS -e never -c test_gns_lookup.conf 50gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_REDIRECT_SERVER -t A -V $TEST_IP_PLUS -e never -c test_gns_lookup.conf
51gnunet-namestore -D -z $MY_EGO 51sleep 3
52RES_REDIRECT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t A -c test_gns_lookup.conf` 52RES_REDIRECT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t A -c test_gns_lookup.conf`
53RES_REDIRECT_RAW=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t REDIRECT -c test_gns_lookup.conf` 53RES_REDIRECT_RAW=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t REDIRECT -c test_gns_lookup.conf`
54RES_REDIRECT_ZKEY=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ZKEY -t A -c test_gns_lookup.conf` 54RES_REDIRECT_ZKEY=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ZKEY -t A -c test_gns_lookup.conf`
diff --git a/src/gns/test_gns_rel_expiration.sh b/src/gns/test_gns_rel_expiration.sh
index 5334e048d..a240cfd0f 100755
--- a/src/gns/test_gns_rel_expiration.sh
+++ b/src/gns/test_gns_rel_expiration.sh
@@ -34,6 +34,7 @@ DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO |
34gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 34gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
35gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf 35gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf
36gnunet-arm -i gns -c test_gns_lookup.conf 36gnunet-arm -i gns -c test_gns_lookup.conf
37sleep 0.5
37# confirm that lookup currently works 38# confirm that lookup currently works
38RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` 39RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf`
39# remove entry 40# remove entry
diff --git a/src/gns/test_gns_revocation.sh b/src/gns/test_gns_revocation.sh
index 500cced1e..2253adcb4 100755
--- a/src/gns/test_gns_revocation.sh
+++ b/src/gns/test_gns_revocation.sh
@@ -26,6 +26,7 @@ DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO |
26gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 26gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
27gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 27gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
28gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 28gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
29sleep 1
29RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` 30RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf`
30gnunet-revocation -R $OTHER_EGO -p -c test_gns_lookup.conf 31gnunet-revocation -R $OTHER_EGO -p -c test_gns_lookup.conf
31RES_IP_REV=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` 32RES_IP_REV=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf`
diff --git a/src/gns/test_gns_soa_lookup.sh b/src/gns/test_gns_soa_lookup.sh
index 326b99a8f..a697782bb 100755
--- a/src/gns/test_gns_soa_lookup.sh
+++ b/src/gns/test_gns_soa_lookup.sh
@@ -34,6 +34,7 @@ fi
34gnunet-arm -s -c test_gns_lookup.conf 34gnunet-arm -s -c test_gns_lookup.conf
35gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 35gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
36gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf 36gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf
37sleep 0.5
37RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf` 38RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf`
38gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf > /dev/null 2>&1 39gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf > /dev/null 2>&1
39gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 40gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/gns/test_gns_txt_lookup.sh b/src/gns/test_gns_txt_lookup.sh
index 5956d8bc7..4e36e8ad8 100755
--- a/src/gns/test_gns_txt_lookup.sh
+++ b/src/gns/test_gns_txt_lookup.sh
@@ -22,6 +22,7 @@ LABEL="testtxt"
22gnunet-arm -s -c test_gns_lookup.conf 22gnunet-arm -s -c test_gns_lookup.conf
23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 23gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf 24gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf
25sleep 0.5
25RES_TXT=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t TXT -c test_gns_lookup.conf` 26RES_TXT=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t TXT -c test_gns_lookup.conf`
26gnunet-namestore -z $MY_EGO -d -n $LABEL -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf 27gnunet-namestore -z $MY_EGO -d -n $LABEL -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf
27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 28gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index 48c27380b..029abe208 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -100,7 +100,7 @@
100/** 100/**
101 * Our workers 101 * Our workers
102 */ 102 */
103static pthread_t *worker; 103static pthread_t * worker;
104 104
105/** 105/**
106 * Lock for the open jobs queue. 106 * Lock for the open jobs queue.
@@ -113,6 +113,11 @@ static pthread_mutex_t jobs_lock;
113static pthread_mutex_t results_lock; 113static pthread_mutex_t results_lock;
114 114
115/** 115/**
116 * Wait condition on new jobs
117 */
118static pthread_cond_t empty_jobs;
119
120/**
116 * For threads to know we are shutting down 121 * For threads to know we are shutting down
117 */ 122 */
118static int in_shutdown = GNUNET_NO; 123static int in_shutdown = GNUNET_NO;
@@ -855,6 +860,7 @@ perform_dht_put (const struct GNUNET_IDENTITY_PrivateKey *key,
855 job->expire_pub = expire_pub; 860 job->expire_pub = expire_pub;
856 GNUNET_CONTAINER_DLL_insert (jobs_head, jobs_tail, job); 861 GNUNET_CONTAINER_DLL_insert (jobs_head, jobs_tail, job);
857 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock)); 862 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock));
863 pthread_cond_signal (&empty_jobs);
858 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 864 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
859 "Storing %u record(s) for label `%s' in DHT with expiration `%s'\n", 865 "Storing %u record(s) for label `%s' in DHT with expiration `%s'\n",
860 rd_public_count, 866 rd_public_count,
@@ -1208,6 +1214,7 @@ perform_dht_put_monitor (const struct GNUNET_IDENTITY_PrivateKey *key,
1208 job->expire_pub = expire_pub; 1214 job->expire_pub = expire_pub;
1209 GNUNET_CONTAINER_DLL_insert (jobs_head, jobs_tail, job); 1215 GNUNET_CONTAINER_DLL_insert (jobs_head, jobs_tail, job);
1210 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock)); 1216 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock));
1217 pthread_cond_signal (&empty_jobs);
1211} 1218}
1212 1219
1213 1220
@@ -1297,13 +1304,12 @@ sign_worker (void *cls)
1297 while (GNUNET_YES != in_shutdown) 1304 while (GNUNET_YES != in_shutdown)
1298 { 1305 {
1299 GNUNET_assert (0 == pthread_mutex_lock (&jobs_lock)); 1306 GNUNET_assert (0 == pthread_mutex_lock (&jobs_lock));
1300 if (NULL != jobs_head) 1307 while (NULL == jobs_head)
1301 { 1308 pthread_cond_wait (&empty_jobs, &jobs_lock);
1302 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1309 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1303 "Taking on Job for %s\n", jobs_head->label); 1310 "Taking on Job for %s\n", jobs_head->label);
1304 job = jobs_head; 1311 job = jobs_head;
1305 GNUNET_CONTAINER_DLL_remove (jobs_head, jobs_tail, job); 1312 GNUNET_CONTAINER_DLL_remove (jobs_head, jobs_tail, job);
1306 }
1307 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock)); 1313 GNUNET_assert (0 == pthread_mutex_unlock (&jobs_lock));
1308 if (NULL != job) 1314 if (NULL != job)
1309 { 1315 {
@@ -1318,10 +1324,6 @@ sign_worker (void *cls)
1318 "Done, notifying main thread through pipe!\n"); 1324 "Done, notifying main thread through pipe!\n");
1319 GNUNET_DISK_file_write (fh, "!", 1); 1325 GNUNET_DISK_file_write (fh, "!", 1);
1320 } 1326 }
1321 else
1322 {
1323 sleep (1);
1324 }
1325 } 1327 }
1326 return NULL; 1328 return NULL;
1327} 1329}