]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix flawed response logic for COOKIE-less queries
authorMichał Kępień <michal@isc.org>
Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)
commitde42425bbd6f51edf2abc0e57d4d3e3dd2e92159
treeb2612872fa5f99ab148c4b5b783debfb15452062
parentc61539279d4ecc04f9816b2ae62d63ed8a143c19
Fix flawed response logic for COOKIE-less queries

The "yield" keyword does not cause a function to return.  By design,
get_responses() may yield multiple DNS responses in a single call.  As
currently implemented, CookieHandler.get_responses() sends two responses
to each client query that does not contain a COOKIE option.  Make the
logic in that method consistent with code comments by only sending one
response to every query - either SERVFAIL or BADCOOKIE, never both.
bin/tests/system/resend_loop/ans3/ans.py