summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index 6ec65617..6ea2841a 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -490,10 +490,19 @@ func (adj *AdjRib) GetOutCount(rf bgp.RouteFamily) int {
return len(adj.adjRibOut[rf])
}
-func (adj *AdjRib) DropAll(rf bgp.RouteFamily) {
+func (adj *AdjRib) DropIn(rf bgp.RouteFamily) {
if _, ok := adj.adjRibIn[rf]; ok {
- // replace old one
adj.adjRibIn[rf] = make(map[string]*Path)
+ }
+}
+
+func (adj *AdjRib) DropOut(rf bgp.RouteFamily) {
+ if _, ok := adj.adjRibIn[rf]; ok {
adj.adjRibOut[rf] = make(map[string]*Path)
}
}
+
+func (adj *AdjRib) DropAll(rf bgp.RouteFamily) {
+ adj.DropIn(rf)
+ adj.DropOut(rf)
+}