Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISIS: Generate L2 LSP on startup #473

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions protocols/isis/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ func (s *Server) Start() {
s.running = true
}

s.lsdbL2.updateL2LSP()

decrementTicker := clock.Ticker(time.Second)
minLSPTransTicker := clock.Ticker(minimumLSPTransmissionInterval)
psnpTransTicker := clock.Ticker(time.Second * 5)
csnpTransTicker := clock.Ticker(csnpTransmissionInterval)
s.lsdbL2.start(decrementTicker, minLSPTransTicker, psnpTransTicker, csnpTransTicker)

return
}

type Adjacency struct {
Expand Down Expand Up @@ -188,7 +188,7 @@ func (s *Server) GetInterfaceNames() []string {
}

// updateL2LSP updates the systems L2 LSP. This is triggered when:
// 1. Router starts up (todo)
// 1. Router starts up (done)
// 2. Periodic refresh timer expired (done)
// 3. A new adjacency is formed (done)
// 4. An adjacency goes down (done)
Expand Down
2 changes: 1 addition & 1 deletion protocols/isis/types/isis.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type SourceID struct {
CircuitID uint8
}

func (sysID *SystemID) String() string {
func (sysID SystemID) String() string {
return fmt.Sprintf("%x%x.%x%x.%x%x", sysID[0], sysID[1], sysID[2], sysID[3], sysID[4], sysID[5])
}

Expand Down
4 changes: 2 additions & 2 deletions tests/isis_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ var (
0, 0x5f, // Length
7, 6, // Remaining Lifetime
12, 12, 12, 13, 13, 13, 0, 0, // LSP ID
0, 0, 0, 2, // Sequence number
0x54, 0xc9, // Checksum
0, 0, 0, 3, // Sequence number
0x52, 0xca, // Checksum
0, // Type block
// TLVs
1, // Area
Expand Down
Loading