Skip to content

Commit

Permalink
ISIS: Generate L2 LSP on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
taktv6 committed Jul 21, 2024
1 parent 63eef2b commit 0f52089
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 0f52089

Please sign in to comment.