53-run-commands-pre-up-and-post-down

- Ability to run a command pre up and post down
- Ability to be a client in one mesh and a peer in the other
- Added dev card to specify different sync rate, keepalive rate per
  mesh.
This commit is contained in:
Tim Beatham
2023-12-10 19:21:54 +00:00
parent 4a8a39601f
commit fe14f63217
27 changed files with 466 additions and 474 deletions

View File

@@ -14,7 +14,7 @@ type RouteManager interface {
type RouteManagerImpl struct {
meshManager MeshManager
conf *conf.WgMeshConfiguration
conf *conf.DaemonConfiguration
}
func (r *RouteManagerImpl) UpdateRoutes() error {
@@ -38,7 +38,7 @@ func (r *RouteManagerImpl) UpdateRoutes() error {
return err
}
if r.conf.AdvertiseDefaultRoute {
if *r.conf.BaseConfiguration.AdvertiseDefaultRoute {
_, ipv6Default, _ := net.ParseCIDR("::/0")
mesh1.AddRoutes(NodeID(self),
@@ -106,6 +106,6 @@ func (r *RouteManagerImpl) UpdateRoutes() error {
return nil
}
func NewRouteManager(m MeshManager, conf *conf.WgMeshConfiguration) RouteManager {
func NewRouteManager(m MeshManager, conf *conf.DaemonConfiguration) RouteManager {
return &RouteManagerImpl{meshManager: m, conf: conf}
}