AttributeError: 'CookieOption' object has no attribute 'data'
With dnspython>=2.7.0, the cookie
system test fails permanently, preventing FreeBSD 13.3->13.4 upgrade in CI.
2024-10-14 16:39:54 INFO:cookie.test_cookie I:check that test server is correctly configured (34)
2024-10-14 16:39:59 INFO:cookie.test_cookie I:failed
2024-10-14 16:39:59 INFO:cookie.test_cookie I:check that spoofed response is dropped when we have a server cookie (35)
2024-10-14 16:40:04 INFO:cookie.test_cookie I:exceeded time limit waiting for literal 'missing expected cookie from' in ns1/named.run
2024-10-14 16:40:04 INFO:cookie.test_cookie I:failed
2024-10-14 16:40:04 INFO:cookie.test_cookie I:check that gracefully handle server disabling DNS COOKIE we have a server cookie (36)
2024-10-14 16:40:09 INFO:cookie.test_cookie I:exceeded time limit waiting for literal 'missing expected cookie from' in ns1/named.run
2024-10-14 16:40:09 INFO:cookie.test_cookie I:failed
It's easy to trigger the condition manually.
- Start the server.
root@freebsd:~/bind9/bin/tests/system # python3.11 cookie/ans9/ans.py &
Using DNS version 2.7.0
Listening on 10.53.0.9 port 5300
Listening on 10.53.0.10 port 5300
Listening on fd92:7065:b8e:ffff::9 port 5300
Listening on fd92:7065:b8e:ffff::10 port 5300
Ctrl-c to quit
- Query it.
/root/bind9/bin/dig/dig -p 5300 @10.53.0.9 +notcp tld
;; communications error to 10.53.0.9#5300: timed out
;; communications error to 10.53.0.9#5300: connection refused
;; communications error to 10.53.0.9#5300: connection refused
; <<>> DiG 9.21.3-dev <<>> -p 5300 @10.53.0.9 +notcp tld
; (1 server found)
;; global options: +cmd
;; no servers could be reached
- Server dies.
UDP Query received on 10.53.0.9 A tld.
Traceback (most recent call last):
File "/root/bind9/bin/tests/system/cookie/ans9/ans.py", line 269, in <module>
rsp = create_response(msg[0], False, True, ns10)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/bind9/bin/tests/system/cookie/ans9/ans.py", line 124, in create_response
if len(o.data) == 8:
^^^^^^
AttributeError: 'CookieOption' object has no attribute 'data'
Edited by Nicki Křížek