m-lab / uuid-annotator

Produces metadata locally for every connection on each server.
Apache License 2.0
0 stars 0 forks source link

Fix enumeration of local interface IPs #8

Closed stephen-soltesz closed 4 years ago

stephen-soltesz commented 4 years ago

Previously, the uuid-annotator was failing to lookup 100% IPs. This turned out to be caused by a failure to determine direction of flows in: https://github.com/m-lab/uuid-annotator/blob/1fc8c0aa523ff58f11036503f98a9b456f40f8c1/ipannotator/ipannotator.go#L49-L68

Because it was comparing flow IPs ("4.14.5.71") to local interfaces with "" because the collection of the localIPs in main.go failed to parse the netblock format for local interface addrs.

This change casts the local interface addrs to *net.IPNet` and extracts the net.IP from within. This change also includes additional logging. And, the annotations result struct is annotated for bigquery with standard column names.


This change is Reviewable

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 69


Totals Coverage Status
Change from base Build 64: 0.0%
Covered Lines: 222
Relevant Lines: 222

💛 - Coveralls
stephen-soltesz commented 4 years ago

Part of https://github.com/m-lab/dev-tracker/issues/549

stephen-soltesz commented 4 years ago

https://github.com/m-lab/dev-tracker/issues/534