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 6f644ee1ca
Author: FUJITA Tomonori <[email protected]>
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 <[email protected]>
Fix the bug introduced by the following commit:
commit aca6fd6ad4
Author: ISHIDA Wataru <[email protected]>
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 <[email protected]>
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 <[email protected]>
have watcherManager to manage all watchers
also merge grpc neighbor state monitoring handling to grpcWatcher
Signed-off-by: ISHIDA Wataru <[email protected]>
Another regression introduced by 4c9cd88c61
Previous fix (81bc3851b2) 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 <[email protected]>
regression introduced by 4c9cd88c61
also fix test/lib to test configuration without local-address
(configure local-address only if neighbor-address is IPv6)
Signed-off-by: ISHIDA Wataru <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
sending REDISTRIBUTE_DEFAULT_ADD command causes getting every routes
zebra has which is not desirable behavior
Signed-off-by: ISHIDA Wataru <[email protected]>
- 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 <[email protected]>
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 <[email protected]>