diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-09 04:54:29 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-12-09 04:54:29 -0800 |
commit | e92a04c9a880e81fdec116f837c5384cd79e0fcd (patch) | |
tree | e6e7e38e0d11ae53016f1112b44d7aeac0871cb0 /server/server.go | |
parent | b963b94fbf3479ce670f5ef1c499a11c8fef1e0f (diff) |
server: use ID() for path's Filter and Filtered methods instead of TableID()
Needs to use ID() for path's Filter and Filtered methods instead of
TableID(). We don't hit any bugs because:
- With a RS client, both methods returns the same.
- No IN POLICY support for non RS clients
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/server.go b/server/server.go index c8764587..8896ade2 100644 --- a/server/server.go +++ b/server/server.go @@ -656,7 +656,7 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) []* rib := server.globalRib if peer != nil && peer.isRouteServerClient() { for _, path := range pathList { - path.Filter(peer.TableID(), table.POLICY_DIRECTION_IMPORT) + path.Filter(peer.ID(), table.POLICY_DIRECTION_IMPORT) path.Filter(table.GLOBAL_RIB_NAME, table.POLICY_DIRECTION_IMPORT) } moded := []*table.Path{} @@ -667,14 +667,14 @@ func (server *BgpServer) propagateUpdate(peer *Peer, pathList []*table.Path) []* for _, before := range pathList { after := server.policy.ApplyPolicy(targetPeer.TableID(), table.POLICY_DIRECTION_IMPORT, before) if after == nil { - before.Filter(targetPeer.TableID(), table.POLICY_DIRECTION_IMPORT) + before.Filter(targetPeer.ID(), table.POLICY_DIRECTION_IMPORT) } else if after != before { - before.Filter(targetPeer.TableID(), table.POLICY_DIRECTION_IMPORT) + before.Filter(targetPeer.ID(), table.POLICY_DIRECTION_IMPORT) for _, n := range server.neighborMap { if n == targetPeer { continue } - after.Filter(n.TableID(), table.POLICY_DIRECTION_IMPORT) + after.Filter(n.ID(), table.POLICY_DIRECTION_IMPORT) } moded = append(moded, after) } |