fix: access: open cost error

This commit is contained in:
Daniel Ding
2022-10-10 17:11:17 +08:00
parent 84090587aa
commit 2c3f8c0ef5

View File

@@ -127,11 +127,11 @@ func (p *Point) OnTap(w *TapWorker) error {
if err != nil {
p.out.Error("Point.OnTap: Get %s: %s", p.brName, err)
}
}
if p.config.Interface.Cost > 0 {
port := network.NewBrPort(name)
if err := port.Cost(p.config.Interface.Cost); err != nil {
p.out.Error("Point.OnTap: Cost %s: %s", err)
if p.config.Interface.Cost > 0 {
port := network.NewBrPort(name)
if err := port.Cost(p.config.Interface.Cost); err != nil {
p.out.Error("Point.OnTap: Cost %s: %s", p.brName, err)
}
}
}
p.link = link