修复混拨配置无法更新的问题

This commit is contained in:
2025-09-11 16:06:14 +08:00
parent b71c41424b
commit d70bdaae16
3 changed files with 59 additions and 40 deletions

View File

@@ -3,8 +3,9 @@ package jd
import "fmt"
type EdgeInfo struct {
Mac string
City string
Mac string
City string
Network string
}
func GatewayConfigSet(version int, macaddr string, edges []EdgeInfo) error {
@@ -23,7 +24,7 @@ func GatewayConfigSet(version int, macaddr string, edges []EdgeInfo) error {
rules[i] = GateConfigSetReqRule{
Enable: true,
Edge: []string{edge.Mac},
Network: []string{fmt.Sprintf("172.30.168.%d", i+2)},
Network: []string{edge.Network},
Cityhash: edge.City, // 每个 edge 的城市应当相同
}
}