forked from extern/smegmesh
- Fixing errors with stale paths
This commit is contained in:
parent
8a49809855
commit
90cfe820d2
@ -6,14 +6,14 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
||||
ctrlserver "github.com/tim-beatham/wgmesh/pkg/ctrlserver"
|
||||
"github.com/tim-beatham/wgmesh/pkg/ipc"
|
||||
logging "github.com/tim-beatham/wgmesh/pkg/log"
|
||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
||||
"github.com/tim-beatham/wgmesh/pkg/robin"
|
||||
"github.com/tim-beatham/wgmesh/pkg/sync"
|
||||
timer "github.com/tim-beatham/wgmesh/pkg/timers"
|
||||
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||
ctrlserver "github.com/tim-beatham/smegmesh/pkg/ctrlserver"
|
||||
"github.com/tim-beatham/smegmesh/pkg/ipc"
|
||||
logging "github.com/tim-beatham/smegmesh/pkg/log"
|
||||
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||
"github.com/tim-beatham/smegmesh/pkg/robin"
|
||||
"github.com/tim-beatham/smegmesh/pkg/sync"
|
||||
timer "github.com/tim-beatham/smegmesh/pkg/timers"
|
||||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
)
|
||||
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
||||
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
)
|
||||
|
||||
|
@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
||||
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
)
|
||||
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
||||
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||
)
|
||||
|
||||
func NewGmap() *GMap[string, bool] {
|
||||
|
@ -7,5 +7,5 @@ import (
|
||||
)
|
||||
|
||||
type IPAllocator interface {
|
||||
GetIP(key wgtypes.Key, meshId string, collisionCount int) (net.IP, error)
|
||||
GetIP(key wgtypes.Key, meshId string, collisionCount uint8) (net.IP, error)
|
||||
}
|
||||
|
@ -39,10 +39,10 @@ func (u *ULABuilder) GetIPNet(meshId string) (*net.IPNet, error) {
|
||||
return net, nil
|
||||
}
|
||||
|
||||
func (u *ULABuilder) GetIP(key wgtypes.Key, meshId string, collisionCount int) (net.IP, error) {
|
||||
func (u *ULABuilder) GetIP(key wgtypes.Key, meshId string, collisionCount uint8) (net.IP, error) {
|
||||
ulaPrefix := getMeshPrefix(meshId)
|
||||
|
||||
c, err := NewCga(key, ulaPrefix)
|
||||
c, err := NewCga(key, collisionCount, ulaPrefix)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -286,7 +286,7 @@ func (s *MeshManagerImpl) AddSelf(params *AddSelfParams) error {
|
||||
|
||||
pubKey := s.HostParameters.PrivateKey.PublicKey()
|
||||
|
||||
collisionCount := 0
|
||||
collisionCount := uint8(0)
|
||||
|
||||
var nodeIP *net.IPNet
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user