mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-05 18:20:48 -08:00
IPv6 support for outside (udp) (#369)
This commit is contained in:
parent
9e94442ce7
commit
7073d204a8
34 changed files with 1726 additions and 732 deletions
|
|
@ -16,15 +16,15 @@ func TestControl_GetHostInfoByVpnIP(t *testing.T) {
|
|||
// Special care must be taken to re-use all objects provided to the hostmap and certificate in the expectedInfo object
|
||||
// To properly ensure we are not exposing core memory to the caller
|
||||
hm := NewHostMap("test", &net.IPNet{}, make([]*net.IPNet, 0))
|
||||
remote1 := NewUDPAddr(100, 4444)
|
||||
remote2 := NewUDPAddr(101, 4444)
|
||||
remote1 := NewUDPAddr(int2ip(100), 4444)
|
||||
remote2 := NewUDPAddr(net.ParseIP("1:2:3:4:5:6:7:8"), 4444)
|
||||
ipNet := net.IPNet{
|
||||
IP: net.IPv4(1, 2, 3, 4),
|
||||
Mask: net.IPMask{255, 255, 255, 0},
|
||||
}
|
||||
|
||||
ipNet2 := net.IPNet{
|
||||
IP: net.IPv4(1, 2, 3, 5),
|
||||
IP: net.ParseIP("1:2:3:4:5:6:7:8"),
|
||||
Mask: net.IPMask{255, 255, 255, 0},
|
||||
}
|
||||
|
||||
|
|
@ -80,11 +80,11 @@ func TestControl_GetHostInfoByVpnIP(t *testing.T) {
|
|||
VpnIP: net.IPv4(1, 2, 3, 4).To4(),
|
||||
LocalIndex: 201,
|
||||
RemoteIndex: 200,
|
||||
RemoteAddrs: []udpAddr{*remote1, *remote2},
|
||||
RemoteAddrs: []*udpAddr{remote1, remote2},
|
||||
CachedPackets: 0,
|
||||
Cert: crt.Copy(),
|
||||
MessageCounter: 0,
|
||||
CurrentRemote: *NewUDPAddr(100, 4444),
|
||||
CurrentRemote: NewUDPAddr(int2ip(100), 4444),
|
||||
}
|
||||
|
||||
// Make sure we don't have any unexpected fields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue