summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-03 11:40:02 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-03 11:40:02 +0900
commitb02f24e01213a19b92ebd96b703e0240fdf8d3ff (patch)
treea591d3d8eaa1fc437f4a0b11f5705c9e8eeb589b /server
parentc922dd575ac2c35afe3c6fb3ffea66e9b621c23e (diff)
server: bug fix of extra as-path prepending
When gobgp originates a route, the generated route had incorrect as-path. this patch fix this bug. Scenario test is also added to check this. [before] $ gobgp neighbor global rib Network Next Hop AS_PATH Age Attrs *> 10.0.1.0/24 192.168.10.3 65001 00:03:20 [{Origin: IGP} {Med: 0}] *> 10.0.2.0/24 192.168.10.4 65002 00:03:36 [{Origin: IGP} {Med: 200}] *> 10.10.0.0/24 0.0.0.0 65000 00:03:37 [{Origin: IGP}] $ gobgp neighbor 192.168.10.5 adj-out Network Next Hop AS_PATH Attrs 10.0.1.0/24 192.168.10.2 65000 65001 [{Origin: IGP}] 10.0.2.0/24 192.168.10.2 65000 65002 [{Origin: IGP}] 10.10.0.0/24 192.168.10.2 65000 65000 [{Origin: IGP}] [after] $ gobgp neighbor global rib Network Next Hop AS_PATH Age Attrs *> 10.0.1.0/24 192.168.10.3 65001 00:03:20 [{Origin: IGP} {Med: 0}] *> 10.0.2.0/24 192.168.10.4 65002 00:03:36 [{Origin: IGP} {Med: 200}] *> 10.10.0.0/24 0.0.0.0 00:03:37 [{Origin: IGP}] $ gobgp neighbor 192.168.10.5 adj-out Network Next Hop AS_PATH Attrs 10.0.1.0/24 192.168.10.2 65000 65001 [{Origin: IGP}] 10.0.2.0/24 192.168.10.2 65000 65002 [{Origin: IGP}] 10.10.0.0/24 192.168.10.2 65000 [{Origin: IGP}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go
index 683fcc6d..57f7c7ee 100644
--- a/server/server.go
+++ b/server/server.go
@@ -675,8 +675,6 @@ func handleGlobalRibRequest(grpcReq *GrpcRequest, peerInfo *table.PeerInfo) []*t
pattr := make([]bgp.PathAttributeInterface, 0)
pattr = append(pattr, bgp.NewPathAttributeOrigin(bgp.BGP_ORIGIN_ATTR_TYPE_IGP))
- asparam := bgp.NewAs4PathParam(bgp.BGP_ASPATH_ATTR_TYPE_SEQ, []uint32{peerInfo.AS})
- pattr = append(pattr, bgp.NewPathAttributeAsPath([]bgp.AsPathParamInterface{asparam}))
rf := grpcReq.RouteFamily
path, ok := grpcReq.Data.(*api.Path)