mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 16:34:25 +01:00
HostInfo.remoteCidr should only be populated with the entire vpn ip address issued in the certificate (#1494)
This commit is contained in:
@@ -714,8 +714,7 @@ func (i *HostInfo) CreateRemoteCIDR(c *cert.NebulaCertificate) {
|
||||
//TODO: IPV6-WORK what to do when ip is invalid?
|
||||
nip, _ := netip.AddrFromSlice(ip.IP)
|
||||
nip = nip.Unmap()
|
||||
bits, _ := ip.Mask.Size()
|
||||
remoteCidr.Insert(netip.PrefixFrom(nip, bits), struct{}{})
|
||||
remoteCidr.Insert(netip.PrefixFrom(nip, nip.BitLen()), struct{}{})
|
||||
}
|
||||
|
||||
for _, n := range c.Details.Subnets {
|
||||
|
||||
Reference in New Issue
Block a user