Closed stephen-soltesz closed 1 year ago
internal/triggertrace/triggertrace_test.go
line 291 at r2 (raw file):
} staticIPv4Netblock = &parser.Scamper1{
Since it's very difficult to know what's different among these four initializations, does it make sense to do something like the following?
staticIPv4Netblock = staticIPv4None
staticIPv4None.Tracelb.Dst = "4.4.4.0" // NETBLOCK
staticIPv4None.Tracelb.Nodes[0].Links = : [][]parser.ScamperLink{{{Addr: "4.4.4.0"}}} // NETBLOCK
staticIPv4None.Tracelb.Nodes[1].Addr = "4.4.4.0" // NETBLOCK
staticIPv4None.Tracelb.Nodes[1].Links = [][]parser.ScamperLink{{{Addr: "4.4.4.0"}}}, // NETBLOCK
So it's immediately clear what has changed?
This change adds a new test for the
triggertrace
handler to verify that the output truly has netblock anonymization applied for v4 and v6 addresses.This change adds a static definition of traces that include intermediate hops that should be anonymized in addition to the destination address.
This change is![Reviewable](https://reviewable.io/review_button.svg)