mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
[9.18] chg: test: Support dnspython 2.7.0
Closes #4988 Backport of MR !9634 Merge branch 'backport-4988-dnspython-2.7.0-support-9.18' into 'bind-9.18' See merge request isc-projects/bind9!9636
This commit is contained in:
commit
6cb3cc642b
1 changed files with 8 additions and 4 deletions
|
|
@ -121,10 +121,14 @@ def create_response(msg, tcp, first, ns10):
|
|||
)
|
||||
elif labels[0] != "tcponly" or tcp:
|
||||
cookie = o
|
||||
if len(o.data) == 8:
|
||||
cookie.data = o.data + o.data
|
||||
else:
|
||||
cookie.data = o.data
|
||||
try:
|
||||
if len(o.server) == 0:
|
||||
cookie.server = o.client
|
||||
except AttributeError: # dnspython<2.7.0 compat
|
||||
if len(o.data) == 8:
|
||||
cookie.data = o.data + o.data
|
||||
else:
|
||||
cookie.data = o.data
|
||||
r.use_edns(options=[cookie])
|
||||
r.flags |= dns.flags.AA
|
||||
return r
|
||||
|
|
|
|||
Loading…
Reference in a new issue