Skip to content

Commit

Permalink
Fix invalid type assertion in BGP FSM
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Geiselhardt-Herms authored and taktv6 committed Jul 28, 2022
1 parent eddc5ab commit 225a40b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/bgp/server/fsm_address_family.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (f *fsmAddressFamily) bmpInit() {
func (f *fsmAddressFamily) bmpDispose() {
f.rib.GetContributingASNs().Remove(f.fsm.peer.localASN)

f.adjRIBIn.(*adjRIBIn.AdjRIBIn).Flush()
f.adjRIBIn.Flush()

f.adjRIBIn.Unregister(f.rib)

Expand Down
1 change: 1 addition & 0 deletions routingtable/client_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type AdjRIB interface {
// AdjRIBIn is the interface any AdjRIBIn must implement
type AdjRIBIn interface {
AdjRIB
Flush()
}

// AdjRIBOut is the interface any AdjRIBOut must implement
Expand Down
2 changes: 2 additions & 0 deletions routingtable/mock_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,5 @@ func (m *RTMockClient) ReplaceFilterChain(filter.Chain) {}
func (m *RTMockClient) ReplacePath(*net.Prefix, *route.Path, *route.Path) {}

func (m *RTMockClient) Dispose() {}

func (m *RTMockClient) Flush() {}

0 comments on commit 225a40b

Please sign in to comment.