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
(cherry picked from commit f2c06477af)
(cherry picked from commit 6c49166b06)
This commit is contained in:
Graham Hayes 2016-03-04 15:00:57 +00:00
parent b479cb7a3c
commit a4b4c6dfb8
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,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)