Warning for truncated DNS messages (#25666)

* Log warning if DNS response truncated
* Docs msg
This commit is contained in:
Christopher Batey 2018-09-21 14:19:37 +01:00 committed by Arnout Engelen
parent 546f1634c9
commit 63e00634d4
2 changed files with 10 additions and 0 deletions

View file

@ -103,6 +103,10 @@ import scala.util.Try
log.debug(s"Received message from [{}]: [{}]", remote, data)
val msg = Message.parse(data)
log.debug(s"Decoded: $msg")
// TODO remove me when #25460 is implemented
if (msg.flags.isTruncated) {
log.warning("DNS response truncated and fallback to TCP is not yet implemented. See #25460")
}
val (recs, additionalRecs) = if (msg.flags.responseCode == ResponseCode.SUCCESS) (msg.answerRecs, msg.additionalRecs) else (Nil, Nil)
val response = Answer(msg.id, recs, additionalRecs)
inflightRequests.get(response.id) match {

View file

@ -1,5 +1,11 @@
# DNS Extension
@@@ warning
`async-dns` does not currently support TCP fallback and so DNS repsonses may be truncated. See [#25460](https://github.com/akka/akka/issues/25460)
@@@
@@@ note
The `async-dns` API is marked as `ApiMayChange` as more information is expected to be added to the protocol.