Browse Source

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)
Graham Hayes 3 years ago
parent
commit
6c49166b06
2 changed files with 11 additions and 1 deletions
  1. 1
    1
      designate/service.py
  2. 10
    0
      releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml

+ 1
- 1
designate/service.py View File

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

+ 10
- 0
releasenotes/notes/mini-dns-tcp-c1a15742f5c71739.yaml View File

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

Loading…
Cancel
Save