Skip to content

Commit

Permalink
fix: load route when nexthops is empty (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy-Zhu authored Apr 17, 2024
1 parent 60b3afd commit 9ee4918
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/switch/nextgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ func (c *NextGroupStrategyImpl) LoadRoute(nlr *nl.Route) {
c.routes = append(c.routes, nlr)
nlr.MultiPath = c.buildNexthopInfos()
nlr.Gw = nil
c.updateRoute(nlr)
if len(nlr.MultiPath) == 0 {
c.out.Debug("ignored if no nexthop")
} else {
c.updateRoute(nlr)
}
}

func (c *NextGroupStrategyImpl) UnloadRoute(rt *nl.Route) {
Expand Down

0 comments on commit 9ee4918

Please sign in to comment.