Skip to content
Snippets Groups Projects
Commit 198b4658 authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Small fix in tsig_sign().

In old (pre-rrset-change) version, the TSIG error was set only in
case it was BADTIME. I'm not sure whether any other error can get
into this function, but it does not matter, it should behave in
the same way as before.
parent 66b0b7fb
No related branches found
No related tags found
No related merge requests found
......@@ -486,7 +486,10 @@ int knot_tsig_sign(uint8_t *msg, size_t *msg_len,
}
/* Create rdata for TSIG RR. */
tsig_create_rdata(tmp_tsig, key->algorithm, tsig_rcode);
tsig_create_rdata(tmp_tsig, key->algorithm,
(tsig_rcode == KNOT_TSIG_RCODE_BADTIME)
? tsig_rcode
: 0);
tsig_rdata_set_alg(tmp_tsig, key->algorithm);
/* Distinguish BADTIME response. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment