summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-07 08:50:55 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-07 08:50:55 +0900
commit72c2e8ba39239a0b497aff554c4b5b2e8d5c94b2 (patch)
tree4c4a59aee57bb04a2e89c34d8dd96f5f7a65361f /table
parent4b0830a5fe7ba20d9bb100b2bd03a944d634b447 (diff)
server: fix soft reset out
soft reset out needs to use routes in the local table instead of the adj-in. The export policy will be applied correctly. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-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)
+}