There was an error while loading. Please reload this page.
1 parent 1958255 commit 52837f8Copy full SHA for 52837f8
lib/rubydns/handler.rb
@@ -65,8 +65,10 @@ def receive_data(data)
65
@server.logger.warn "Response via UDP was larger than #{UDP_TRUNCATION_SIZE}!"
66
67
# Reencode data with truncation flag marked as true:
68
-answer.tc = 1
69
-data = answer.encode.byteslice(0, UDP_TRUNCATION_SIZE)
+truncation_error = Resolv::DNS::Message.new(answer.id)
+truncation_error.tc = 1
70
+
71
+data = truncation_error.encode
72
end
73
74
self.send_data(data)
0 commit comments