mirror of
https://github.com/luscis/openlan.git
synced 2025-10-20 23:51:31 +08:00
fix: cert not update
This commit is contained in:
2
Makefile
2
Makefile
@@ -55,7 +55,7 @@ clean: ## clean cache
|
||||
## prepare environment
|
||||
update:
|
||||
git submodule init
|
||||
git submodule update
|
||||
git submodule update --remote
|
||||
|
||||
vendor:
|
||||
go clean -modcache
|
||||
|
@@ -153,12 +153,13 @@ func (s *Switch) Format() {
|
||||
for _, obj := range s.Network {
|
||||
context := obj.Specifies
|
||||
obj.NewSpecifies()
|
||||
if data, err := libol.Marshal(context, true); err == nil {
|
||||
if err := libol.Unmarshal(obj.Specifies, data); err != nil {
|
||||
libol.Warn("Switch.Format %s", err)
|
||||
} else {
|
||||
libol.Info("Switch.Format %v", obj.Specifies)
|
||||
}
|
||||
if obj.Specifies == nil {
|
||||
continue
|
||||
}
|
||||
if data, err := libol.Marshal(context, true); err != nil {
|
||||
libol.Warn("Switch.Format %s", err)
|
||||
} else if err := libol.Unmarshal(obj.Specifies, data); err != nil {
|
||||
libol.Warn("Switch.Format %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ func NewOpenLANWorker(c *co.Network) *OpenLANWorker {
|
||||
}
|
||||
|
||||
func (w *OpenLANWorker) updateVPN() {
|
||||
cfg, vpn := w.GetCfgs()
|
||||
_, vpn := w.GetCfgs()
|
||||
if vpn == nil {
|
||||
return
|
||||
}
|
||||
@@ -47,7 +47,7 @@ func (w *OpenLANWorker) updateVPN() {
|
||||
routes := vpn.Routes
|
||||
routes = append(routes, vpn.Subnet)
|
||||
if addr := w.Subnet(); addr != "" {
|
||||
libol.Info("OpenLANWorker.updateVPN %s subnet %s", cfg.Name, addr)
|
||||
w.out.Info("OpenLANWorker.updateVPN subnet %s", addr)
|
||||
routes = append(routes, addr)
|
||||
}
|
||||
|
||||
|
@@ -33,6 +33,7 @@ func (w *RouterWorker) updateVPN() {
|
||||
routes := vpn.Routes
|
||||
routes = append(routes, vpn.Subnet)
|
||||
for _, sub := range spec.Subnets {
|
||||
w.out.Info("RouterWorker.updateVPN subnet %s", sub.CIDR)
|
||||
routes = append(routes, sub.CIDR)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user