107 Commits
Author SHA1 Message Date
Hitoshi Irino 7284d4cf8b Avoid panic by receiving vpnv6 prefixes with zebra reported in issue #2113
- Additionally bug fix which avoid panic caused by displaying vpnv6 prefixes using gobgp vrf rib
- Supporting FRRouting 7.1.x
2019-07-21 15:25:50 +09:00
Hitoshi IrinoandFUJITA Tomonori 2f5a4d59cb BGP connection on a speecified interface (including which is associated VRF) using syscall SO_BINDTODEVICE 2019-07-02 11:40:22 +09:00
Hitoshi Irino 7c2f0967af fix MPLS L3VPN functionality of zapi 2019-06-17 22:25:04 +09:00
Michael Lechner c5c10006c0 Support ipv4-flowspec for VRF enslaved neighbor 2019-06-08 20:33:48 -04:00
Hitoshi Irino c3a6d636df fix bug pointed out by issue #2089 2019-06-02 16:14:19 +09:00
FUJITA Tomonori 11c1ce77f9 server: replace github.com/satori/go.uuid
satori/go.uuid broke the API without the major version updated. We
could work around this with the module feature but looks like there is
a better option, google/uuid, so let's replace it.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-05-08 08:52:31 +09:00
Hitoshi IrinoandFUJITA Tomonori 7d2823d4c0 zebra: supporting FRRouting version 7
- the "version" parameter (which means ZAPI) 6 in zebra config changes supporting FRRouting version 7 instead of FRRouting version 6.
 - the "software-name" parameter which supports backward compatibility is added in zebra config.
   (GoBGP support FRRouting version 6 when "version = 6" and "software-name = frr6" is configured.)
2019-05-08 08:48:26 +09:00
FUJITA Tomonori bec61c4f38 server: make ListPath API show filtered paths
This adds the feature to show filtered paths by policies to ListPath
API.

with EnableFiltered in ListPathRequest enabled:

- ListPath for adj-in sets filtered on paths filtered by policys
- ListPath for adj-out includes paths filtered by policys with filtered set.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-04-16 12:40:36 +09:00
wanghonghaoandFUJITA Tomonori ba63f7e076 fsm: not reject open message with restart flag unset from gr peer 2019-04-09 23:09:36 +09:00
FUJITA Tomonori f37fa07875 server: fix path validatoin result regression
Somehow the state isn't updated.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-04-02 20:39:18 +09:00
FUJITA Tomonori ccdc2e6277 add secondary-route feature for router server
if an export policy rejects a selected route, try the next route in
order until one that is accepted is found or all routes for the peer
are rejected.

the default is disabled. You can enable this feature in the following
way:

[neighbors.route-server.config]
  route-server-client = true
  secondary-route = true

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-04-02 16:01:29 +09:00
FUJITA Tomonori 3b36a13bbd server: fix passive-mode
passive mode configuration is just ignored. Fixed it to work.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-04-01 20:08:54 +09:00
FUJITA Tomonori 49448ac67d server: fix ListPath handle UseMultiPath option
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-03-29 14:00:13 +09:00
JieJhih JhangandFUJITA Tomonori fb1e303870 fix same issues in other files 2019-03-26 07:44:02 +09:00
FUJITA Tomonori 4a7c30cb8f server: handle grpc listen failure as fatal error
Fixed the bug to ignore grpc listen failure.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-03-26 06:39:08 +09:00
JieJhih JhangandFUJITA Tomonori 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 <[email protected]>
2019-03-24 22:16:12 +09:00
FUJITA Tomonori c6aef93ef1 fix race of peer deletion
Fixed a race bug that causes the unittest failure. Also fixed
StopBgp() to block until all the peers are deleted cleanly.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-03-24 20:34:21 +09:00
Hitoshi Irino 276518c826 Deleteing goroutine for assignMplsLabel and moveing code relating MPLS L3VPN (introduced from PR osrg#1992, commit 3a79ad3) from table_manager.go to zclient.go 2019-03-17 20:47:05 +09:00
zabio3andFUJITA Tomonori 6345fdd20a Fixed typos 2019-03-16 19:35:04 +09:00
FUJITA Tomonori ed0580dadf pkg/server: fix global rib summary command
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-03-14 21:52:32 +09:00
Hitoshi IrinoandFUJITA Tomonori 7228b3dc1f Refactoring source code for BGP/MPLS L3VPN with ZAPI 6
- Deleting receiveVrfId (which is introduced on 2 previous commit 90eeb5de87) from Path struct and Introducing pathVrf Map in zclient.
 - Recovering logic (which is changed on 1 previous commit acfd5bedb6) to use assignMplsLabel in server.go.
 - Refectoring zclient's newIPRouteBody for deleating duplicate logic for IPv4 and IPv6.
2019-03-14 21:20:31 +09:00
Hitoshi IrinoandFUJITA Tomonori 4967c82a36 Fix bug using variable of zclient in AddVrf of server.go. 2019-03-14 21:20:31 +09:00
Hitoshi IrinoandFUJITA Tomonori 3a79ad3fdc Supporting BGP/MPLS L3VPNs with Frrouting Zebra API 6
- This commit aims to solve reported problem on issues #1611, #1648 and #1912
 - Partial changes of this commit duplicate with changes on PR #1587 (not merged) and PR #1766 (not merged and already closed)
 - This commit is tested with only FRRouting version 6.0.2 (which uses Zebra API 6)
 - This commit fixes lack of LABEL_MANAGER_CONNECT_ASYNC for ZAPI6.
   (This bug is introduced on commit 2bdb76f2dc "Supporting Zebra API version 6 which is used in FRRouting version 6")
2019-03-14 21:20:31 +09:00
wanghonghao 084ee991d9 reset eor state on graceful-restart peer down 2019-02-15 13:30:38 +08:00
Thomas RosensteinandFUJITA Tomonori 034b889e4d [Fix #1972] Fix returning of double list size, half nil values 2019-02-15 07:06:31 +09:00
FUJITA Tomonori 36572f85fc server: fix ListPolicyAssignmet() with empty name
if the name isn't specified, the assignment of the global and route
server clients. Non route server client doesn't have the assignment.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-27 21:33:25 +09:00
FUJITA Tomonori 526bd67f5d server: dynamic neighbor deletion panic
https://github.com/osrg/gobgp/commit/318a91e31b8baed86bb66a3767525da68ae49a5d

The above commit added a bug to close a closed channel; after deleting
a dynamic neighbor, handleFSMMessage() must return. Otherwise
cleanInfiniteChannel() is called twice.

https://travis-ci.org/osrg/gobgp/jobs/483896487

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-25 22:57:13 +09:00
Foivos Filippopoulos 318a91e31b Allow graceful restart for dynamic neighbors 2019-01-17 17:07:34 +00:00
Eiichiro Watanabe 61d7a5e90b server: Fix peer down reason code in BMP 2019-01-12 00:51:23 +09:00
FUJITA Tomonori 98d8925b82 server: fix wait time before active conneciton
also avoid unittest race.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-09 21:24:29 +09:00
FUJITA Tomonori 1d14b8ecfb silence staticcheck warnings
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-09 14:36:48 +09:00
Hitoshi IrinoandFUJITA Tomonori 4e862fa8f0 zebra: Introducing MIN_ZAPIVER and MAX_ZAPIVER. And avoiding double close channel when sequential retry to connect zebra.
- Introducing MIN_ZAPIVER and MAX_ZAPIVER for avoiding editing files except for zapi.go when new ZAPI version will be supported in future.
- Fix a bug avoiding panic by double close for a channel.
- Changing algorithm for sequential retry to connect zebra.
2018-12-30 21:52:15 +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 bbc85d46c3 server: kill getNeighbor()
Use ListPeer() instead.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-29 08:34:03 +09:00
FUJITA Tomonori d7e5bf22a6 fix bmp statistics
fix the regression of the adj counter due to
301b48532d

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-28 23:27:53 +09:00
FUJITA Tomonori 8e7741a0a8 api: rename ValidationDetail to Validation
Let's simply use 'validation' because there is no other validation
structure.

We could add validation results from other than rpki so drop rpki name.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-24 10:13:00 +09:00
FUJITA Tomonori 8d0a8b0ffa make the usage of type name in protobuf consistent
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-23 23:40:37 +09:00
FUJITA Tomonori ababf3068c make Add/Delete/ListPath APIs symmetric
- AddPath() with an api.Path object then DeletePath() works with the same api.Path object.
- ListPath() returns an api.Path object then DeletePath() works with the same api.Path object.

The above is guaranteed with and without PeerInfo (SourceAsn and SourceId).

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-23 19:29:23 +09:00
FUJITA Tomonori 46e3754761 server: replace tomb with context
All what we need is cancelling. Let's use the standard way for it,
context.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-19 20:14:24 +09:00
FUJITA Tomonori 598bba9fb2 server: use Dialer Control method instead of hack to modify connection before dialing
Use the feature of go 1.11 to remove the hack.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-12-19 20:11:56 +09:00
FUJITA Tomonori 301b48532d support received, accepted, and advertised counters per family
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-26 17:49:48 +09:00
FUJITA Tomonori a5763c20d4 api: remove AddPaths from Peer and PeerGroup
AddPaths in AfiSafi should be used; it can handle configuration per
family.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 23:27:02 +09:00
FUJITA Tomonori 7ec6a96962 api: move RouterId to PeerState from PeerConf
It's not configuration.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-25 20:15:04 +09:00
FUJITA Tomonori 79a461c147 api: move remote_cap and local_cap to PeerState from PeerConf
Both should be in PeerState like OpenConfig.

Also remove unused supported_capabilities.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-23 21:01:03 +09:00
FUJITA Tomonori dbd0c21d2e server: fix handleRouteRefresh and softResetOut
both assume that getBestFromLocal() returns filtered paths by policies
but it doesn't. Paths filtered by policies are returned as withdraw
paths.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-17 21:50:32 +09:00
FUJITA Tomonori 6b05d9db0f api: rename NlriAny in api.Path to Nlri
Also rename PathAttrsAny to PathAttrs. Both are the first choice
rather than the binary format members.

Support SortType member to ListPathRequest to add an option to return
unordered paths.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 16:49:49 +09:00
FUJITA Tomonori 8856dd599a server: fix handleRouteRefresh()
Can't modify a Path object in a table.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 14:51:46 +09:00
FUJITA Tomonori c1bca25559 use google/protobuf/timestamp.proto
use google/protobuf/timestamp.proto instead of our own way to
represent time.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-16 12:23:18 +09:00
Eiichiro WatanabeandFUJITA Tomonori fa387c9065 Fix Statistics Report in BMP 2018-11-14 19:32:24 +09:00