mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-01-05 21:09:07 +01:00
- Fixing errors with stale paths
This commit is contained in:
parent
8a49809855
commit
90cfe820d2
@ -6,14 +6,14 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
|
||||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||||
ctrlserver "github.com/tim-beatham/wgmesh/pkg/ctrlserver"
|
ctrlserver "github.com/tim-beatham/smegmesh/pkg/ctrlserver"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/ipc"
|
"github.com/tim-beatham/smegmesh/pkg/ipc"
|
||||||
logging "github.com/tim-beatham/wgmesh/pkg/log"
|
logging "github.com/tim-beatham/smegmesh/pkg/log"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/robin"
|
"github.com/tim-beatham/smegmesh/pkg/robin"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/sync"
|
"github.com/tim-beatham/smegmesh/pkg/sync"
|
||||||
timer "github.com/tim-beatham/wgmesh/pkg/timers"
|
timer "github.com/tim-beatham/smegmesh/pkg/timers"
|
||||||
"golang.zx2c4.com/wireguard/wgctrl"
|
"golang.zx2c4.com/wireguard/wgctrl"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
"github.com/tim-beatham/smegmesh/pkg/conf"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
"github.com/tim-beatham/smegmesh/pkg/mesh"
|
||||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/tim-beatham/wgmesh/pkg/lib"
|
"github.com/tim-beatham/smegmesh/pkg/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewGmap() *GMap[string, bool] {
|
func NewGmap() *GMap[string, bool] {
|
||||||
|
@ -7,5 +7,5 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type IPAllocator interface {
|
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
|
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)
|
ulaPrefix := getMeshPrefix(meshId)
|
||||||
|
|
||||||
c, err := NewCga(key, ulaPrefix)
|
c, err := NewCga(key, collisionCount, ulaPrefix)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -286,7 +286,7 @@ func (s *MeshManagerImpl) AddSelf(params *AddSelfParams) error {
|
|||||||
|
|
||||||
pubKey := s.HostParameters.PrivateKey.PublicKey()
|
pubKey := s.HostParameters.PrivateKey.PublicKey()
|
||||||
|
|
||||||
collisionCount := 0
|
collisionCount := uint8(0)
|
||||||
|
|
||||||
var nodeIP *net.IPNet
|
var nodeIP *net.IPNet
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user