Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 5ed002c

Browse files
Merge pull request #12 from tomvil/remove_persistentRoutes
Remove persistent routes function
2 parents 1cd9ba0 + 7aa41f0 commit 5ed002c

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=1.2.1
1+
VERSION=1.2.2
22
PACKAGES_DIR=compiled_packages
33

44
all: test build

cmd/neigh2route/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func main() {
3737
}()
3838

3939
go nm.SendPings()
40-
go nm.PersistentRoutes()
4140

4241
nm.MonitorNeighbors()
4342
}

internal/neighbor/manager.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -190,24 +190,6 @@ func (nm *NeighborManager) SendPings() {
190190
}
191191
}
192192

193-
func (nm *NeighborManager) PersistentRoutes() {
194-
for {
195-
nm.mu.Lock()
196-
neighbors := make([]Neighbor, len(nm.reachableNeighbors))
197-
copy(neighbors, nm.reachableNeighbors)
198-
nm.mu.Unlock()
199-
200-
log.Printf("Adding persistent routes for %d neighbors", len(neighbors))
201-
for _, n := range neighbors {
202-
if err := netutils.AddRoute(n.ip, n.linkIndex); err != nil {
203-
log.Printf("Failed to add route for neighbor %s: %v", n.ip.String(), err)
204-
}
205-
}
206-
207-
<-time.After(30 * time.Second)
208-
}
209-
}
210-
211193
func (nm *NeighborManager) Cleanup() {
212194
nm.mu.Lock()
213195
defer nm.mu.Unlock()

0 commit comments

Comments
 (0)