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

EDNS: Fixed adding OPT to packet.

parent d4eaee12
Branches
Tags
No related merge requests found
......@@ -655,9 +655,12 @@ static int solve_additional(int state, knot_pkt_t *pkt,
struct query_data *qdata, void *ctx)
{
/* Put OPT RR. */
int ret = knot_pkt_put(pkt, COMPR_HINT_NONE, pkt->opt_rr, 0);
if (ret != KNOT_EOK) {
return ERROR;
int ret;
if (pkt->opt_rr != NULL) {
ret = knot_pkt_put(pkt, COMPR_HINT_NONE, pkt->opt_rr, 0);
if (ret != KNOT_EOK) {
return ERROR;
}
}
/* Scan all RRs in ANSWER/AUTHORITY. */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment