Skip to content
Snippets Groups Projects
Commit 17cba1c8 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Check if we're in a right section when adding OPT.

parent 056c64c7
No related branches found
No related tags found
1 merge request!147Packet Api Rewrite
......@@ -471,6 +471,11 @@ int knot_pkt_put_opt(knot_pkt_t *pkt)
return KNOT_EINVAL;
}
/* OPT should be only in the AR. */
if (pkt->current != KNOT_ADDITIONAL) {
return KNOT_ENOTSUP;
}
/* \note #190, not going to be pretty until then */
if (pkt->opt_rr.version == EDNS_NOT_SUPPORTED) {
return KNOT_EOK;
......
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