wenovus
aa0cf39f37
Export Generated BGP Configuration Code
...
Move internal/pkg/config -> pkg/config/oc
Background: #2593
2023-09-30 09:53:37 +09:00
Rinat Baygildin
b8e17e06cd
Use filter for watch pre/post-update watch events
...
Filtering by peer address worked only for initial state.
Using watch event's filter allows to use it for each event and could be extended by other conditions, e.g. peer group.
peer_address and peer_group were added to API (backward compatible).
Signed-off-by: Rinat Baygildin <bayrinat@yandex-team.ru >
2023-09-06 15:35:55 +09:00
FUJITA Tomonori
711063a9f5
Add ListBmp API
...
Get the status of BMP stations.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2022-01-13 02:07:20 +00:00
FUJITA Tomonori
395a6d1bd2
server: fix bmp crash
...
fixed the following bug. With bmp established, adding a peer config
leads to this. Adding a peer config should not send bmp peer message.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa41c0a]
goroutine 36 [running]:
github.com/osrg/gobgp/v3/pkg/server.bmpPeerDown(0xc00032c370, 0x18, 0x0, 0xc00040cc78)
/home/ubuntu/git/gobgp/pkg/server/bmp.go:296 +0x10a
github.com/osrg/gobgp/v3/pkg/server.(*bmpClient).loop.func1(0xc00037f0e0, 0xc000416000)
/home/ubuntu/git/gobgp/pkg/server/bmp.go:228 +0xe65
github.com/osrg/gobgp/v3/pkg/server.(*bmpClient).loop(0x0)
/home/ubuntu/git/gobgp/pkg/server/bmp.go:265 +0x85
created by github.com/osrg/gobgp/v3/pkg/server.(*bmpClientManager).addServer
/home/ubuntu/git/gobgp/pkg/server/bmp.go:370 +0x2b3
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-16 13:31:22 +00:00
FUJITA Tomonori
04a8a56fe6
server: fix bmp regression due to WatchEvent API
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-15 05:12:28 +00:00
FUJITA Tomonori
ea58a919f4
Add WatchEvent API to replace MonitorPeer and MonitorTable
...
get peer and path events in order.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-14 01:11:24 +00:00
FUJITA Tomonori
6eeabdf01b
proto: replace 'as' with 'asn'
...
For consistency, always use 'asn' instead of 'as', 'as_number', etc.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-11 01:36:20 +00:00
FUJITA Tomonori
97aefbb24a
decouple logging
...
gobgp is tightly coupled with logrus and uses the global logrus logger
instance. The uses of gobgp library can't use other logging libraries.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-08 10:39:16 +00:00
FUJITA Tomonori
c593d7c8b3
switch to Go API v2 for protobuf
...
seems that sticking to Go API v1 for protobuf is headache for projects
using GoBGP.
This breaks the compatibility so bumps up the major version to 3.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2021-12-08 07:22:50 +00:00
Carl Baldwin
9e98fcf1d6
Do not suppress initial non-established peer state in MonitorPeer
...
The issue with the initial update was that sometimes a connection had
not yet been established. Trying to get remote and local connection
data caused a segmentation violation because `fsm.conn` was nil.
Also adds a flag to MonitorPeerRequest in the GRPC API to enable the
new behavior to avoid backward incompatibility.
fixes #2047
2021-04-22 17:40:15 -06:00
Alistair King
5c979fea68
Use MonitorTableRequest.Name to filter by peer
...
Filter returned Paths based on provided peer address (similar to
GetTable). This should improve performance when using MonitorTable
with ADJ_IN and Current for a single peer.
2020-11-06 21:08:55 +09:00
Sergey Elantsev
136c8222c4
fixed style: unnecessary type cast after type switch and some minor issues.
2020-03-11 06:21:16 +09:00
JieJhih Jhang
80ff3a325c
support BMP sysName and sysDescr configuration
2019-03-25 20:11:44 +09:00
FUJITA Tomonori
04843ab503
server: broadcast BMPPeerDownMessage for peer deletion
...
Sends peerdown message when a peer is de-condigured and down.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2019-03-24 22:16:12 +09:00
Eiichiro Watanabe
61d7a5e90b
server: Fix peer down reason code in BMP
2019-01-12 00:51:23 +09:00
Eiichiro Watanabe
67947eeda6
Fix incorrect values in BMP Statistics Report(type 7 and 8)
2018-12-30 08:49:05 +09:00
FUJITA Tomonori
d7e5bf22a6
fix bmp statistics
...
fix the regression of the adj counter due to
301b48532d
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com >
2018-12-28 23:27:53 +09:00
Eiichiro Watanabe
fa387c9065
Fix Statistics Report in BMP
2018-11-14 19:32:24 +09:00
Eiichiro Watanabe
52c6ef31b4
server: Fix timestamp when msg is nil
2018-11-08 13:30:15 +09:00
FUJITA Tomonori
df8ad76b5c
server: unexported Watcher stuff
...
Replace it with the new API using api/.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp >
2018-11-07 20:19:23 +09:00
FUJITA Tomonori
5a2985e52f
server: unexport fsm stuff
...
No need to export the bgp peer internals.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp >
2018-10-30 07:22:47 +09:00
FUJITA Tomonori
840807a520
pkg/server: public APIs use structures in api/
...
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp >
2018-08-10 09:10:44 +09:00
FUJITA Tomonori
c4775c4251
follow Standard Go Project Layout
...
https://github.com/golang-standards/project-layout
Now you can see clearly what are private and public library code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp >
2018-07-07 20:44:25 +09:00