mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
BUG/MINOR: dns: add test on result getting value from buffer into ring.
This patch adds a missing test in dns_session_io_handler, getting the query id from the buffer of the ring. An error should never happen since messages are completely added atomically. This bug should fix github issue #1133
This commit is contained in:
parent
e3f7bd5ae9
commit
538bb0441c
@ -522,6 +522,13 @@ static void dns_session_io_handler(struct appctx *appctx)
|
||||
|
||||
/* backup original query id */
|
||||
len = b_getblk(buf, (char *)&original_qid, sizeof(original_qid), ofs + cnt);
|
||||
if (!len) {
|
||||
/* should never happen since messages are atomically
|
||||
* written into ring
|
||||
*/
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
/* generates new query id */
|
||||
new_qid = ++ds->query_counter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user