mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix crash after reload where a stats lookup could reference old key
cache and neg cache structures.
This commit is contained in:
parent
9b3f3101e3
commit
2c4be0c201
3 changed files with 18 additions and 12 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
because dnscrypt-proxy (2.0.36) does not support the test setup
|
because dnscrypt-proxy (2.0.36) does not support the test setup
|
||||||
any more, and also the config file format does not seem to have
|
any more, and also the config file format does not seem to have
|
||||||
the appropriate keys to recreate that setup.
|
the appropriate keys to recreate that setup.
|
||||||
|
- Fix crash after reload where a stats lookup could reference old key
|
||||||
|
cache and neg cache structures.
|
||||||
|
|
||||||
10 January 2020: Wouter
|
10 January 2020: Wouter
|
||||||
- Fix the relationship between serve-expired and prefetch options,
|
- Fix the relationship between serve-expired and prefetch options,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ if grep "10.20.30.40" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -37,7 +37,7 @@ $PRE/unbound-control -c ub.conf blablargh
|
||||||
if test $? -ne 1; then
|
if test $? -ne 1; then
|
||||||
echo "wrong exit value on error."
|
echo "wrong exit value on error."
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
|
@ -61,7 +61,7 @@ if grep "5.6.7.8" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -72,6 +72,8 @@ echo "$PRE/unbound-control -c ub.conf stats"
|
||||||
$PRE/unbound-control -c ub.conf stats > tmp.$$
|
$PRE/unbound-control -c ub.conf stats > tmp.$$
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
echo "wrong exit value after success"
|
echo "wrong exit value after success"
|
||||||
|
cat fwd.log
|
||||||
|
cat unbound.log
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if grep "^total.num.queries=[1-9][0-9]*$" tmp.$$; then
|
if grep "^total.num.queries=[1-9][0-9]*$" tmp.$$; then
|
||||||
|
|
@ -90,7 +92,7 @@ if test $? -ne 0; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check syntax error in parse
|
# check syntax error in parse
|
||||||
echo "$PRE/unbound-control -c ub.conf verbosity jkdf"
|
echo "$PRE/unbound-control -c ub.conf verbosity jkdf"
|
||||||
$PRE/unbound-control -c ub.conf verbosity jkdf
|
$PRE/unbound-control -c ub.conf verbosity jkdf
|
||||||
if test $? -ne 1; then
|
if test $? -ne 1; then
|
||||||
|
|
@ -135,7 +137,7 @@ if grep "192.0.2.1" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -149,7 +151,7 @@ if grep "NXDOMAIN" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -169,7 +171,7 @@ if grep "NXDOMAIN" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -189,7 +191,7 @@ if grep "SERVFAIL" outfile; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "Not OK"
|
echo "Not OK"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -216,7 +218,7 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# test lookup
|
# test lookup
|
||||||
echo "$PRE/unbound-control -c ub.conf lookup www.example.com"
|
echo "$PRE/unbound-control -c ub.conf lookup www.example.com"
|
||||||
$PRE/unbound-control -c ub.conf lookup www.example.com
|
$PRE/unbound-control -c ub.conf lookup www.example.com
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
|
|
@ -282,7 +284,7 @@ done
|
||||||
if kill -0 $UNBOUND_PID; then
|
if kill -0 $UNBOUND_PID; then
|
||||||
echo "still up!"
|
echo "still up!"
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "not stopped, failure"
|
echo "not stopped, failure"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -294,7 +296,7 @@ else
|
||||||
echo "lock-verify test worked."
|
echo "lock-verify test worked."
|
||||||
else
|
else
|
||||||
echo "lock-verify test failed."
|
echo "lock-verify test failed."
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -302,7 +304,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "> cat logfiles"
|
echo "> cat logfiles"
|
||||||
cat fwd.log
|
cat fwd.log
|
||||||
cat unbound.log
|
cat unbound.log
|
||||||
echo "> OK"
|
echo "> OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,9 @@ val_deinit(struct module_env* env, int id)
|
||||||
anchors_delete(env->anchors);
|
anchors_delete(env->anchors);
|
||||||
env->anchors = NULL;
|
env->anchors = NULL;
|
||||||
key_cache_delete(val_env->kcache);
|
key_cache_delete(val_env->kcache);
|
||||||
|
env->key_cache = NULL;
|
||||||
neg_cache_delete(val_env->neg_cache);
|
neg_cache_delete(val_env->neg_cache);
|
||||||
|
env->neg_cache = NULL;
|
||||||
free(val_env->nsec3_keysize);
|
free(val_env->nsec3_keysize);
|
||||||
free(val_env->nsec3_maxiter);
|
free(val_env->nsec3_maxiter);
|
||||||
free(val_env);
|
free(val_env);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue