Hi, I'm not sure if this repo is still maintained. It seems that the WalkMatch method does not support both IPv4 and IPv6. This is unexpected to me since a regular Match works fine. Can this be fixed?
func Test_TrieBug(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
trie := critbitgo.NewNet()
_, ipNet, _ := net.ParseCIDR("160.0.0.0/8")
_ = trie.Add(ipNet, 4)
_, ipNet, _ = net.ParseCIDR("a000:0000:0800::/48")
_ = trie.Add(ipNet, 6)
_, ipNet, _ = net.ParseCIDR("a000:0000:0800:a0a0:a0a0:a0a0:a0a0:a0a0/128")
trie.WalkMatch(ipNet, func(ipNet *net.IPNet, i interface{}) bool {
if ipNet.IP.To4() != nil {
t.Fatalf("V6 IP matched with V4 IP")
}
return true
})
}
Hi, I'm not sure if this repo is still maintained. It seems that the WalkMatch method does not support both IPv4 and IPv6. This is unexpected to me since a regular Match works fine. Can this be fixed?