mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-24 01:14:25 +01:00
Fix incorrect CIDR construction in hostmap (#1493)
* Fix incorrect CIDR construction in hostmap * Introduce a regression test for incorrect hostmap CIDR
This commit is contained in:
@@ -738,7 +738,8 @@ func (i *HostInfo) buildNetworks(networks, unsafeNetworks []netip.Prefix) {
|
||||
|
||||
i.networks = new(bart.Lite)
|
||||
for _, network := range networks {
|
||||
i.networks.Insert(network)
|
||||
nprefix := netip.PrefixFrom(network.Addr(), network.Addr().BitLen())
|
||||
i.networks.Insert(nprefix)
|
||||
}
|
||||
|
||||
for _, network := range unsafeNetworks {
|
||||
|
||||
Reference in New Issue
Block a user