]> granicus.if.org Git - pdns/commit
dnsdist: Insert the response into the ringbuffer right after sending it
authorRemi Gacogne <remi.gacogne@powerdns.com>
Sat, 29 Jun 2019 17:21:05 +0000 (19:21 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Sat, 29 Jun 2019 17:21:05 +0000 (19:21 +0200)
commit2f9671330740d7eef2fcf5049df2c745ccbd8911
tree189bab01b72523238ac12bad479377c37eaf8d3d
parent3d3549f1e426b840fc04f25fc7c934d8bf76adf9
dnsdist: Insert the response into the ringbuffer right after sending it

The current code could have tried to read a new query before coming
back to the insertion, resetting the state in the process and leading
to recording a wrong backend or worse, to a NULL-pointer dereference
if the new query was dropped or self-answered (no backend then).
pdns/dnsdist-tcp.cc