mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
1. move the `isDevice(l.host, pi)` to be first, as no need to iterate on all nics if it returns `true` 2. first compare by name, as same nics will have same names 3. if not found by name, compare by ips. the bug was the `strings.HasPrefix` 2 different nics with ipv6: ``` #nic1 ip: f1234::55 #nic2 ip: f1234::55::66::66 ``` so because of the `strings.HasPrefix` it was evaluated as the name nics. but they are not.