]> 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 10:02:20 +0000 (12:02 +0200)
commitef0502bcc6173a5c8b1d5d35ab6703566b836868
tree6b509af038e317a10812e48ebdf7f423c90893d0
parentcfa16e3f247ce35e7d78f3c1c62a9721b7f924eb
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.

(cherry picked from commit de42425bbd6f51edf2abc0e57d4d3e3dd2e92159)
bin/tests/system/resend_loop/ans3/ans.py