mirror of
https://github.com/coredns/coredns.git
synced 2026-10-09 12:05:22 -04:00
#8496 fixed a silent truncation here and named the invariant in its own commit message: entries were dropped and the hosts file simply looked shorter than it is, with nothing in the log. #8516 replaced that mechanism with a streaming parser bounded by maxFieldSize. The error log #8496 added is still in parse(), but it can no longer report a dropped entry: bufio.ErrBufferFull is consumed by the read loop, so only a real I/O error reaches it. A field over maxFieldSize is discarded in lineParser with no log at all, and when that field is the address the whole line goes with it. Report both cases, once per dropped field, with the line number and the source the entries came from. Signed-off-by: Baltasar Blanco <baltasarblanco.dev@gmail.com>
10 KiB
10 KiB