Commit 41a4a222 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent aeae40c7
Pipeline #16364 passed with stages
in 25 seconds
...@@ -26,10 +26,13 @@ export class RouteWriter { ...@@ -26,10 +26,13 @@ export class RouteWriter {
this.via.set(toId, viaId); this.via.set(toId, viaId);
const to = Router.all[toId]; const to = Router.all[toId];
const via = Router.all[viaId]; const via = Router.all[viaId];
// main
for (const address of [to.address, ...to.subnets]) { for (const address of [to.address, ...to.subnets]) {
this.input.push(`route replace ${address} via ${via.linkAddress} table ${config.table} proto ${config.proto}`); this.input.push(`route replace ${address} via ${via.linkAddress} table ${config.table} proto ${config.proto}`);
this.input.push(`route replace default via ${via.linkAddress} table ${to.destMark + 1000} proto ${config.proto}`);
} }
// dest
this.input.push(`route replace default via ${via.linkAddress} table ${to.destMark + 1000} proto ${config.proto}`);
// plan
for (const [table, to] of this.plan.entries()) { for (const [table, to] of this.plan.entries()) {
if (to === toId) { if (to === toId) {
this.input.push(`route replace default via ${via.linkAddress} table ${table} proto ${config.proto}`); this.input.push(`route replace default via ${via.linkAddress} table ${table} proto ${config.proto}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment