Fix for TCP connections not sending full content

Eventlet previously broke the standard API for sockets
and made socket.send() work in the same manor as socket.sendall()

c315ee86da
reverted to the standard behaviour.

This was released as part of 0.18.0.

The bug manifests itself when large (multi TCP message) AXFRs are
performed over long distances.

(I replicated it when the messages grew to 3,
over USWest -> EU transfer)

see http://graham.hayes.ie/posts/minidns-tcp-and-the-internet/
for details on testing.

This change can cause packets to be dropped intermitently -
but retry will allow this to be overcome.

Change-Id: Ia0c15d843fb2092cc693b37dc701492396c647d0
Closes-Bug: #1552864
This commit is contained in:
Graham Hayes 2016-03-04 15:00:57 +00:00
parent 3e95c7c723
commit f2c06477af
2 changed files with 11 additions and 1 deletions

View File

@ -339,7 +339,7 @@ class DNSService(object):
# Handle TCP Responses
msg_length = len(response)
tcp_response = struct.pack("!H", msg_length) + response
client.send(tcp_response)
client.sendall(tcp_response)
else:
# Handle UDP Responses
self._dns_sock_udp.sendto(response, addr)

View File

@ -0,0 +1,10 @@
---
issues:
- The fix for minidns's issues TCP can cause minidns to fail to send some messages.
This manifests itself with eventlet not being able to send all the data
before socket is closed.
critical:
- Previous versions of eventlet changed the behaviour of socket.send() to
match socket.sendall(). in eventlet 0.18.0 this changed and it reverted
to the traditional behaviour. MiniDNS has been updated to allow minidns to
push large zone transfers over long range network connections