{"push_id":744226466,"size":1,"distinct_size":1,"ref":"refs/heads/sniff","head":"e59584a0a37250c61183653465d910b399aabbd1","before":"f66bcfc81397a869619397c7846c3c56442d33c5","commits":[{"sha":"e59584a0a37250c61183653465d910b399aabbd1","author":{"email":"4b8373d016f277527198385ba72fda0feb5da015@bourgon.org","name":"Peter Bourgon"},"message":"Revert to correct edge construction\n\nAnother implicit invariant in the data model is that edges are always of the\nform (local -> remote). That is, the source of an edge must always be a node\nthat originates from within Scope's domain of visibility. This was evident by\nthe presence of ingress and egress fields in edge/aggregate metadata.\n\nWhen building the sniffer, I accidentally and incorrectly violated this\ninvariant, by constructing distinct edges for (local -> remote) and (remote ->\nlocal), and collapsing ingress and egress byte counts to a single scalar. I\nexperienced a variety of subtle undefined behavior as a result. See #339.\n\nThis change reverts to the old, correct methodology. Consequently the sniffer\nneeds to be able to find out which side of the sniffed packet is local v.\nremote, and to do that it needs access to local networks. I moved the\ndiscovery from the probe/host package into probe/main.go.\n\nAs part of that work I discovered that package report also maintains its own,\nindependent \"cache\" of local networks. Except it contains only the (optional)\nDocker bridge network, if it's been populated by the probe, and it's only used\nby the report.Make{Endpoint,Address}NodeID constructors to scope local\naddresses. Normally, scoping happens during rendering, and only for pseudo\nnodes -- see current LeafMap Render localNetworks. This is pretty convoluted\nand should be either be made consistent or heavily commented.","distinct":true,"url":"https://api.github.com/repos/weaveworks/scope/commits/e59584a0a37250c61183653465d910b399aabbd1"}]}