summaryrefslogtreecommitdiffhomepage
path: root/server
AgeCommit message (Collapse)Author
2017-04-17bmp: BMP Route Monitoring for Local RIB routesIWASE Yusuke
This patch enable to send BMP Route Monitoring message for Local RIB routes described in bmp-draft-evens-grow-bmp-local-rib. Configuration Example: gobgpd.toml ... [[bmp-servers]] [bmp-servers.config] address = "127.0.0.1" port=11019 route-monitoring-policy = "local-rib" ... Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-04-17packet/bmp: Obsolete policy argument for BMPPeerHeaderIWASE Yusuke
According to "draft-evens-grow-bmp-local-rib", the L flag in the Peer Flags is NOT used for the locally sourced routes and the F flag is defined into the same bit. This patch removes "policy" argument and add "flags" argument for BMPPeerHeader and NewBMPPeerHeader in order to distinguish which flag is set (the L flag or the F flag). Then introduce IsPostPolicy() func to show if the L flag is set or not. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-04-04skip asn negotiation for BGP unnumbered peersISHIDA Wataru
since BGP unnumbered peers are typically trusted, skip asn negotiation for easy configuration. from configuration file: ```toml [[neighbors]] [[neighbors.config]] neighbor-interface = "eth0" ``` from cli: ``` $ gobgp neighbor add interface eth0 ``` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-04packet/bgp: add extended-nexthop capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-04table: fix bug of UpdatePathAttrs() with ipv6 link-local peerISHIDA Wataru
config.Neighbor.Transport.State.LocalAddress may have zone info and not be valid ip address format. Use PeerInfo.LocalAddress instead. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-04server: fix bug of wrongly set <nil> to PeerInfo.LocalAddressISHIDA Wataru
config.TransportState.LocalAddress may have zone info with ipv6 address like "fe80::x%eth0". In this case, net.ParseIP() returns <nil>, which leads to set <nil> to PeerInfo.LocalAddress. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-04-01server: fix GetRib() to handle error properlyhepeng
fix a bug that GetRib() doesn't return an error even if an error happens.
2017-03-27server/zclient: Retry Zebra message version negotiationIWASE Yusuke
Currently, the Zebra message version used by ZClient is configurable (default 2), but if the given version is miss-matched with that of Zebra daemon, ZCient will fail to connect. This patch fixes ZClient to retry the version negotiation. For example, if failed with the version 2, retry with the version 3. Note: In order to receive the first message from Zebra daemon when instantiating ZClient, this patch fixes ZClient to send HELLO and ROUTER_ID_ADD messages automatically. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06server/zclient: Dampening for Nexthop TrackingIWASE Yusuke
This patch implents dampening for the Nexthop Tracking as Cisco's routers doing. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06server/zclient: Update nexthop state based on NEXTHOP_UPDATEIWASE Yusuke
This patch enables server/zclient to update the metric or the reachability state to the nexthop for implementing the Nexthop Tracking features. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06server/zclient: Register nexthop for Nexthop TrackingIWASE Yusuke
This patch enables server/zclient to register the interested nexthop for implementing the Nexthop Tracking features.
2017-03-05server: fix withdraw with ibgpFUJITA Tomonori
with two ibgp peers (a and b), when peer a advertizes one route and then withdraw it, there are two bugs: - gobgp sends withdrawal to peer a. - gobgp sends withdrawal to peer b. this fixes both. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-05server: avoid sending withdraw to peer just sent withdrawFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-03-05server: add filterpath() unittestFUJITA Tomonori
Test a scenario where peer A and B advertized the same prefix, and A's one was best then peer A withdraws. peer B should get withdrawal. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-21rpki: use context instead of tombFUJITA Tomonori
Let's use context, the standard way to handle cancellation. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-18server: avoid accessing to globalRib before its initializationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-15server: add a current option to WatchBestPath()ISHIDA Wataru
also, use it for zebra integration Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-10zebra: Process per-route MTU zebra messageTatsushi Demachi
Since Quagga 1.0.20160309, it implements per-route MTU handling which adds MTU attribute to every ZEBRA_IPV4_ROUTE_ADD and ZEBRA_IPV6_ROUTE_ADD messages. It causes "message length invalid" error when GoBGP receives messages from Zebra and as the result, routes from Zebra are no longer added to GoBGP. This fixes the issue by decoding/encoding MTU attribute properly. Now parsed MTU attribute is not used anywhere, just kept in an internal structure.
2017-02-09server: fix in-policy bugISHIDA Wataru
When a path is rejected by in-policy, the prefix must be withdrawn since it might already exist in the rib. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-03cli: Administrative Shutdown Communication on disable neighborIWASE Yusuke
This patch adds "--reason" option support into the disable neighbor command which can specify "Administrative Shutdown Communication" on the BGP Cease NOTIFICATION message. Usage: $ gobgp neighbor <neighbor address> disable --reason "some messages" Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-03server/fsm: Logging Administrative Shutdown CommunicationIWASE Yusuke
This patch enable to log the body of the Cease NOTIFICATION message with "Administrative Shutdown" and "Administrative Reset" subcodes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-03cli: Communication on Administrative Shutdown NOTIFICATIONIWASE Yusuke
This patch enable to send an arbitrary message on the Cease NOTIFICATION message with "Administrative Shutdown" and "Administrative Reset" subcodes with "--reason" option. Usage: $ gobgp neighbor <neighbor address> shutdown --reason "some messages" $ gobgp neighbor <neighbor address> reset --reason "some messages" Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-02-02server: fix rpki server stateFUJITA Tomonori
Needs to update the state before copying it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-01-29Fix End of RIB handlingEiichiro Watanabe
- All of EoR except IPv4 unicast have MP_UNREACH only. (RFC4724) - length of the MP_UNREACH attr. should be 3bytes. - length of the value should be 0bytes. - Should send EoR marker in initial exchange of BMP Route Monitoring. (RFC7854)
2017-01-25fix compile failure on freebsd and windowsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-01-22api: add a UUID field to Path structureWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-01-21server: fix a bug of error handlingWataru Ishida
when using named return for management operations, we need to substitute the return value of (*BgpServer).mgmtOperation() to a valiable 'err' for proper error propagation. close #1215 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-06server: refactor mgmt operationISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-11-06server: check server is up before admin operationISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-01-17server: add feature to return matched RoaBucket in ValidatePath() for ↵Eiichrio Watanabe
library usage
2017-01-17server: export some rpki property for library usageEiichrio Watanabe
2017-01-16GetVrf() cause bgpd panic if it is not startedksang
2017-01-15Fix incorrect validation logic (thanks @ishidawataru)Eiichrio Watanabe
2017-01-15Add examples for RPKI Origin ValidationEiichrio Watanabe
2016-12-19bmp: don't send paths already sent in case of softresetin happensWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-12-19server: notify post policy update when soft-reset-in is triggeredWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-12-10server: fix bug when global import policy rejects a routeWataru Ishida
routes rejected by global import policy was not deleted from RIB Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-12-02server: fix bug of deleteNeighbor()Wataru Ishida
cleaning outgoing channel while fsm handler is running may cause crash Dec 2 06:14:36 g2 gobgpd[6955]: {"Topic":"Peer","level":"info","msg":"Delete a peer configuration for:10.173.176.211","time":"2016-12-02T06:14:36Z"} Dec 2 06:14:36 g2 gobgpd[6955]: {"Data":"","Key":"10.173.176.211","Topic":"Peer","level":"warning","msg":"sent notification","time":"2016-12-02T06:14:36Z"} Dec 2 06:14:36 g2 gobgpd[6955]: {"Key":"10.173.176.211","Reason":"notification-sent code 6(cease) subcode 3(peer deconfigured)","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2016-12-02T06:14:36Z"} Dec 2 06:14:36 g2 gobgpd[6955]: panic: interface conversion: interface {} is nil, not *server.FsmOutgoingMsg Dec 2 06:14:36 g2 gobgpd[6955]: goroutine 69 [running]: Dec 2 06:14:36 g2 gobgpd[6955]: panic(0xd26200, 0xc82030c4c0) Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/go/src/runtime/panic.go:481 +0x3e6 Dec 2 06:14:36 g2 gobgpd[6955]: github.com/osrg/gobgp/server.(*FSMHandler).sendMessageloop(0xc8201a66e0, 0x0, 0x0) Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/github.com/osrg/gobgp/server/fsm.go:1136 +0x3c3 Dec 2 06:14:36 g2 gobgpd[6955]: github.com/osrg/gobgp/server.(*FSMHandler).(github.com/osrg/gobgp/server.sendMessageloop)-fm(0x0, 0x0) Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/github.com/osrg/gobgp/server/fsm.go:1175 +0x2e Dec 2 06:14:36 g2 gobgpd[6955]: gopkg.in/tomb%2ev2.(*Tomb).run(0xc8201a66e0, 0xc820278140) Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/gopkg.in/tomb.v2/tomb.go:163 +0x21 Dec 2 06:14:36 g2 gobgpd[6955]: created by gopkg.in/tomb%2ev2.(*Tomb).Go Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/gopkg.in/tomb.v2/tomb.go:159 +0x131 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-29zebra: add flags for recursive nexthop lookup if necessaryWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-25rpki: check asPath == nil before validationWataru Ishida
locally generated routes may not have AS path attribute Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-24server: add unit test to check NumGoroutine with Neighbor configurationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-24server: fix Watcher InfiniteChannel leakFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-21server: fix memory leak in infinite channel goroutineWataru Ishida
infinite channel has internal goroutine which won't stop until all items in the buffer are dequeued. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-18server: disable advertised number calculation with multiple neighborsFUJITA Tomonori
AdjRibOut isn't in memory so needs to be calculated on the fly. Doing such for multiple neighbors consumes too much CPU (especially there are lots of routes). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-17add go vet testWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-15client: remove server package dependencyWataru Ishida
move ROA under table package Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14config/api: create admin-state typeWataru Ishida
align with session-state Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14cli: use client libraryWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14config: use struct type instead of []byte for capability and open msgWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-12server: remove adj-out usageFUJITA Tomonori
With this change, we could send unncessary messages but it's harmless (wastefull though). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>