zmap / zannotate

Utility for annotating Internet datasets with contextual metadata (e.g., origin AS, MaxMind GeoIP2, reverse DNS, and WHOIS)
Apache License 2.0
94 stars 20 forks source link

Support for Readers returning partial Reads #19

Closed justinbastress closed 6 years ago

justinbastress commented 6 years ago

Previously, if io.Read did not return the full amount of requested data, there was a parse error that caused the parsing to silently stop.

This wraps the raw reader in a buffered reader, and uses the standard io.ReadFull command to ensure that the entire header is read.

Further, errors are now passed back to the caller rather than being dropped.

zakird commented 6 years ago

approve minus tests failing]

justinbastress commented 6 years ago

Re: the TravisCI failure, it seems the BGP library has changed recently; internally we pinned its version to "1b84b8145418398e7e68b81cdce506dcf81eec14", so it works with that, but I get the same issue when I run from HEAD.

I guess that should at least be noted in the readme...and maybe the .travisci can switch to that commit ID.