summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-04-10 22:24:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-05-07 21:18:04 +0900
commit2dbca9e29a6813f2df53261ffaa59b9439c13fdd (patch)
tree8303b71da5741ffb592bc74738b6548d078a0253 /server/fsm.go
parent756cc9162afb675dd7ca159b6f07a6d5b927bcc1 (diff)
use sorted single master table for route server setup
https://github.com/osrg/gobgp/issues/1249 The IN policy was removed. The modification by the IMPORT policy are visible to all route server peers. This saves some dozens bytes memory per a path. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/server/fsm.go b/server/fsm.go
index b38cc9a1..db3efe1f 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -897,25 +897,7 @@ func (h *FSMHandler) recvMessageWithError() (*FsmMsg, error) {
return fmsg, err
}
- // RFC4271 9.1.2 Phase 2: Route Selection
- //
- // If the AS_PATH attribute of a BGP route contains an AS loop, the BGP
- // route should be excluded from the Phase 2 decision function.
- var asLoop bool
- if attr := getPathAttrFromBGPUpdate(body, bgp.BGP_ATTR_TYPE_AS_PATH); attr != nil {
- asLoop = hasOwnASLoop(h.fsm.peerInfo.LocalAS, int(h.fsm.pConf.AsPathOptions.Config.AllowOwnAs), attr.(*bgp.PathAttributeAsPath))
- }
-
fmsg.PathList = table.ProcessMessage(m, h.fsm.peerInfo, fmsg.timestamp)
- id := h.fsm.pConf.State.NeighborAddress
- for _, path := range fmsg.PathList {
- if path.IsEOR() {
- continue
- }
- if asLoop || (h.fsm.policy.ApplyPolicy(id, table.POLICY_DIRECTION_IN, path, nil) == nil) {
- path.Filter(id, table.POLICY_DIRECTION_IN)
- }
- }
fallthrough
case bgp.BGP_MSG_KEEPALIVE:
// if the length of h.holdTimerResetCh