fix(network): выбрать IPv6-команду в экспорте GRE
This commit is contained in:
1 parent
1be4a490b5
commit
0c5d7d3207
15 files changed
+204
-10
No files matched your search
+5
-1
@@ -33,7 +33,11 @@ export function generateGreRsc(t: GreTunnel, servers: Record<string, Server>): s
|
||||
args.push("ipsec-secret=" + quoteRosString(t.ipsec.secret || "<IPSEC_PSK>"))
|
||||
}
|
||||
lines.push("/interface/gre/add " + args.join(" "))
|
||||
if (t.localInnerIp) lines.push("/ip/address/add address=" + quoteRosString(t.localInnerIp) + " interface=" + quoteRosString(t.name))
|
||||
if (t.localInnerIp) {
|
||||
const ipv6 = t.localInnerIp.includes(":")
|
||||
if (ipv6) lines.push("# IPv6: новый статический адрес без объявления префикса; pool/EUI-64 и остальные адреса не включены")
|
||||
lines.push((ipv6 ? "/ipv6/address/add" : "/ip/address/add") + " address=" + quoteRosString(t.localInnerIp) + " interface=" + quoteRosString(t.name) + (ipv6 ? " advertise=no" : ""))
|
||||
}
|
||||
if (t.ipsec) lines.push("# Peer/policy создаёт RouterOS по ipsec-secret; ручные объекты IPsec не экспортируются")
|
||||
if (t.ipsec && t.allowFastPath) lines.push("# В снимке включён FastPath: для GRE с IPsec документация RouterOS требует allow-fast-path=no")
|
||||
return lines.join("\n") + "\n"
|
||||
|
||||
Reference in new issue
Block a user