summaryrefslogtreecommitdiffhomepage
path: root/server
AgeCommit message (Collapse)Author
2016-06-27fix two-bytes AS translationFUJITA Tomonori
We can't use the two-bytes AS translation result by the previous session. IOW, the peer might become 4bytes AS capable after the session was down. fix the regression of commit 6f644ee1ca1be81e6ec96c8504e34c26b3d1f8a8 Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Date: Tue Jun 28 10:44:07 2016 +0900 fsm: do two-bytes AS translation if didn't sent 4byte cap Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-28fsm: do two-bytes AS translation if didn't sent 4byte capFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-26support AGGREGATOR and AS4_AGGREGATOR conversionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-27collector: doesn't write empty fieldsFUJITA Tomonori
Avoid writing empty fields with a withdraw message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-27collector: fix withdraw update crashFUJITA Tomonori
Withdraw message doesn't have ASPATH. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-23server: delete unused functions and variablesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-15server: fix unit testFUJITA Tomonori
somehow travis-ci didn't catch Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-14server: replace SenderMsg workaround with InfiniteChannelFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-14collector: Dump some path attributes and some ECsAntoine Eiche
2016-06-14server: fix aca6fd6ad4409b4cb63682bff3c79fca8ca2800d regressionFUJITA Tomonori
Fix the bug introduced by the following commit: commit aca6fd6ad4409b4cb63682bff3c79fca8ca2800d Author: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Date: Tue May 24 05:47:52 2016 +0000 server: refactoring for monitorbestchanged api. use watcher infra The fix is a workaround. We need to rewrite monitor.go shortly to remove the dependency of grpc from server package. So we fix this in a cleaner way soon. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-13drop unknown optional non-transitive attributesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-06-09collector: use AddrPrefixInterface.Flat to generate PrefixAntoine Eiche
The tag NLRI is also added to the update table.
2016-06-10server: remove restart() from watcher interfaceISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-07collector: ping InfluxDB and create database at startupAntoine Eiche
Ping InfluxDB to verify the connection at collector initialization and create the database.
2016-06-06server: support monitoring multipath via gRPCISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server: support injecting multipath to zebraISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server/table: support bgp multipathISHIDA Wataru
This patch adds multiPathList field to watcherEventBestPathMsg and fills it when global.use-multiple-paths.config.enable = true Following patches add support injecting multipath to zebra and monitoring it via gRPC Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server: refactor monitor/watcher infraISHIDA Wataru
have watcherManager to manage all watchers also merge grpc neighbor state monitoring handling to grpcWatcher Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server: refactoring for monitorbestchanged api. use watcher infraISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-06server: refactoring for zebra related code use watcher infraISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-02server: fix another regression of active connectionISHIDA Wataru
Another regression introduced by 4c9cd88c61cb848e36a45657b7cbc63b9c783dc4 Previous fix (81bc3851b2c1f112f157b98a3cf60757a199a31a) fixes active connection of neighbors configured via configuration file. This fixes that of neighbors configured via gRPC API. Test is also added. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server: fix active connection regressionISHIDA Wataru
regression introduced by 4c9cd88c61cb848e36a45657b7cbc63b9c783dc4 also fix test/lib to test configuration without local-address (configure local-address only if neighbor-address is IPv6) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server: support peering with ipv6 link local addressISHIDA Wataru
fix DialTCPTimeoutWithMD5Sig to handle ipv6 scope-id also update ipv6 test to test this feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server/config: fix md5ed ipv6 active connectionISHIDA Wataru
Local address of md5ed active connection was hard-coded as "0.0.0.0". Let's set appropriate default local address (0.0.0.0 or ::) in SetDefaultConfigValues() and clean up (*FSM).connectLoop() instead of ad-hoc connectLoop() fix. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-31server: avoid sending unnecessary udate messages with soft_reset_in for ↵FUJITA Tomonori
route server The current code sets a path to table.POLICY_DIRECTION_NONE, which is still rib's knowPathList. Next time the best path selection happens, the path is moved to oldKnownPathList and wrongly the best path selection code could assume that it was the old best path, and sends an unnecessary update message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-26policy: add support setting self ip address as next-hopISHIDA Wataru
from configuration file [policy-definitions.statements.actions.bgp-actions] set-next-hop = "self" from cli $ gobgp policy statement stmt1 add action next-hop self Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-25policy: add local-pref actionISHIDA Wataru
$ gobgp policy statement st01 add action local-pref 110 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23add collector featureFUJITA Tomonori
dump the update messages and the state change of peers into influxdb: [collector.config] url = "http://localhost:8086" db-name = "gobgp" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-23server/table: fix intra-AS RTC route distributionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23policy: apply export-policy after normal path-attribute updatesISHIDA Wataru
fix incomplete 42ab0376359f1ee378958b7ae37eaf8fbc7a811b Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23vrf: fix rtc withdraw handlingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: improve log messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: add missing call of processOutgoingPaths()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: handle grpc Serve() errorFUJITA Tomonori
Serve() returns when accept() failed. After that, gobgp stop listening on grpc port (no more grpc request). This patch makes sure that gobgp starts listening on grpc port again. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-21policy: apply export-policy after normal path-attribute updatesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-21cli: include route-reflector/route-server infomation in Peer messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: fix connectLoop() select loop not to blockISHIDA Wataru
connect() blocks MIN_CONNECT_RETRY-1 (= 9sec) at most. If a passive connection comes, establish BGP sessions, then BGP sesions goes down right after that (this can happen when the peer sent invalid update messages etc..) while connect() is blocking, FSM.StateChange(), which writes to fsm.getActiveCh can also block. This leads to block the main goroutine in server.go. This commit fix the issue by invoking a goroutine for connect() each time. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: fix connectLoop() goroutine leakISHIDA Wataru
While Connect() is proceeding, fsm can be stopped administratively. In this case, after success of Connect(), no one is reading fsm.connCh, so connectLoop() goroutine can be leaked. This commit fix this issue. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: make active md5ed socket nonblockingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: stringify FSM state in log messagesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-19server: return flowspec routes in rfc compliant mannerISHIDA Wataru
The order of the flowspec routes matters because they will be used as ACL rules and what rule will be applied depends on the order. RFC5575 specifies how flowspec routes should be sorted. This commit implements what it says. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18server: fix socket leak in DialTCPTimeoutWithMD5Sig()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-17server: fix wrong usage of zapiISHIDA Wataru
sending REDISTRIBUTE_DEFAULT_ADD command causes getting every routes zebra has which is not desirable behavior Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-17zebra: make zebra config consistent with the restsFUJITA Tomonori
- split config and state - move to Bgp structure (aligned with Rpki, Bmp, and Mrt) Also makes zebra configured via GRPC channel. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-16server: fix a bug in handleGrpcGetPolicyAssignment()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-11server: fix non StartServer API crashFUJITA Tomonori
Any GRPC API request except for StartSever crashes gobgpd if it's called before StartServer API is called. This fixes the issue. panic: interface conversion: interface {} is nil, not *gobgpapi.GetNeighborResponse goroutine 21 [running]: github.com/osrg/gobgp/server.(*Server).GetNeighbor(0xc82012f520, 0x7f95f0a042b8, 0xc82016c4b0, 0x1138c40, 0xc82012f6f0, 0x0, 0x0) /home/fujita/go/src/github.com/osrg/gobgp/server/grpc_server.go:130 +0x238 github.com/osrg/gobgp/api._GobgpApi_GetNeighbor_Handler(0xcdb320, 0xc82012f520, 0x7f95f0a042b8, 0xc82016c4b0, 0xc820150c40, 0x0, 0x0, 0x0, 0x0, 0x0) /home/fujita/go/src/github.com/osrg/gobgp/api/gobgp.pb.go:3167 +0x16b google.golang.org/grpc.(*Server).processUnaryRPC(0xc820018bd0, 0x7f95f0a04078, 0xc820018c60, 0xc8200dc7e0, 0xc82012f540, 0x110c1b8, 0x0, 0x0, 0x0) /home/fujita/go/src/google.golang.org/grpc/server.go:522 +0xe30 google.golang.org/grpc.(*Server).handleStream(0xc820018bd0, 0x7f95f0a04078, 0xc820018c60, 0xc8200dc7e0, 0x0) Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-11server: print correct reason of state change by configuration changeFUJITA Tomonori
Changing some of configuration leads to sending a notification. So the reason of the BGP state change should be the notification. The main goroutine sends a notification, closes the connection, kill goroutines for the peer. So With the current code, the reason could be "rx failure", "tx failure", or "dying". To avoid that, this patch adds kinda workaround. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-11server: stop sending notification message twiceISHIDA Wataru
fix 3ced192e5c5bda81290e4a13d17bedd66b36b439 we've already sent one before arriving here Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-10server: pretty notification error code logFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-10server: log the change of admin state via config fileFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>