summaryrefslogtreecommitdiffhomepage
path: root/table/table.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-26 08:06:08 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-26 08:09:02 +0900
commitb53944902472a3442f4a0c073458e773da019723 (patch)
treeecbac6c54dd5fee73591c45467dcee6145b84991 /table/table.go
parentd712de0dc604aafd609a6bfecdef867f7d43e46e (diff)
table: assign local identifier to path
The local identifier for path is sent to remote peers. To simplify the implementation, 1) the local identifier is unique per prefix not peer. 2) always assign the local identifier even without addpath-rx-capable peer. In the future, we might need to improve 2) to avoid the unnecessary overhead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table.go')
-rw-r--r--table/table.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/table/table.go b/table/table.go
index c1ed3a29..6e423808 100644
--- a/table/table.go
+++ b/table/table.go
@@ -218,6 +218,9 @@ func (t *Table) getOrCreateDest(nlri bgp.AddrPrefixInterface) *Destination {
"Key": tableKey,
}).Debugf("create Destination")
dest = NewDestination(nlri)
+ dest.localIdMap = NewBitmap(2048)
+ // the id zero means id is not allocated yet.
+ dest.localIdMap.Flag(0)
t.setDestination(tableKey, dest)
}
return dest