133 Commits
Author SHA1 Message Date
Chris Balmain f15ecf8b48 remove incomingCh when deleting dynamic peer 2020-09-16 10:29:01 +10:00
FUJITA Tomonori 2dbb18f93f server: don't send empty ExtendedNexthop capability
Signed-off-by: FUJITA Tomonori <[email protected]>
2020-07-04 22:05:23 +09:00
Serguei BezverkhiandFUJITA Tomonori 833188f526 extend attributes proto for Prefix SID support
Signed-off-by: Serguei Bezverkhi <[email protected]>
2020-05-13 12:58:51 +09:00
Hitoshi Irino cf572bc5fc Refactoring Zebra and supporting frr7.3
- Change const values to camel case from snake case to make zero golint's warnigns
- Introduce convert functions (toEach, toCommon) between the newest version to older versions
- Merge code about decode nexthop to reduce lines of code
- Add frr7.3 statemet in allowable software for config
- Rename and Update generated file by stringer
2020-04-26 07:43:50 +09:00
Sergey ElantsevandFUJITA Tomonori 136c8222c4 fixed style: unnecessary type cast after type switch and some minor issues. 2020-03-11 06:21:16 +09:00
Pavel VorontsovandFUJITA Tomonori 789664e8c3 add support GetTable method for vrfs #2235 2020-02-19 13:35:10 +09:00
Toshiki TsuchiyaandFUJITA Tomonori 543f50ded9 gobgpd: use map for validation table
`Table.destinations` is a map, so the order changes.
This commit allows to get validate information from path by using map for validate table

Fix: https://github.com/osrg/gobgp/issues/2223

Signed-off-by: Toshiki Tsuchiya <[email protected]>
2020-01-05 20:56:43 +09:00
Faicker MoandFUJITA Tomonori cd4fee4880 bgp: fix dynamic neighbors with prefix "0.0.0.0/0"
support prefix "0.0.0.0/0".

Signed-off-by: Faicker Mo <[email protected]>
2019-11-01 20:42:56 +09:00
FUJITA Tomonori 2e05695f68 avoid installing routes with originator ID to global when softresetin
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-10-26 07:02:54 +09:00
Carl BaldwinandFUJITA Tomonori 98a539a2e9 Split Reset into three methods
The Reset method was difficult to understand. The reason is that it
was called in three different ways and did different things in each
case. It is easier to read when the three different modes are each
their own method.

This came up as I was looking deeper into the threading model around
policies. I think this change makes it easier to understand the code.
2019-10-23 10:51:38 +09:00
FUJITA Tomonori 5c5deac888 table: use net.IPNet for roa instead of homegrown IPPrefix structure
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-10-22 21:58:59 +09:00
FUJITA Tomonori a1a523a1b3 move roa table code to table/ from server/
As the name implies, table/ is more appropriate for roa table code.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-10-22 21:17:05 +09:00
FUJITA Tomonori 853944f785 server: speed up session establishment
The unittest on pkg/server finishes quicker.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-10-21 16:10:40 +09:00
mageshgvandFUJITA Tomonori 29412028a7 Fix adj-out display with add path enabled 2019-10-18 07:28:10 +09:00
mageshgvandFUJITA Tomonori 0794811562 Transition to graceful restart state on hold timer expiry if applicable 2019-10-17 14:54:52 +09:00
mageshgvandFUJITA Tomonori 0235f7c675 Support vrfs in zapi multipath 2019-10-15 20:58:16 +09:00
Carl Baldwin ea87564b5b Remove policy from FSM
The `policy` member of fsm is apparently never used. Clean it up to
avoid confusion. Policy is still set on the server and peers.
2019-10-11 17:28:15 -06:00
mageshgv 0da37b0210 Maintain unique vrf IDs in watchEventBestPath vrf map
Fixes missing route propagation to proper vrfs in zapi
2019-10-04 18:19:05 -07:00
Magesh GVandFUJITA Tomonori 6f3cb40164 Update adjrib for LLGR and preserve aslooped attr
Fixes LLGR community cleared on softreset.
Fixes AS Path looped routes added back to rib on Graceful Restart.
2019-10-02 20:45:44 +09:00
Magesh GVandFUJITA Tomonori 22193807af Fix crash on nonexistent vrf delete 2019-10-01 08:28:26 +09:00
FUJITA Tomonori 21093fbc87 server: improve ListPath's performance
send large data rather than sending small repeatedly.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-09-17 06:31:23 +09:00
FUJITA Tomonori 25438b289c execute rpki validation for policy only when it's necessary
currently, validate is executed even if the result is not necessary.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-09-08 22:43:08 +09:00
FUJITA Tomonori 07e70de118 server: fix mrt injection race
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-09-02 21:35:39 +09:00
FUJITA Tomonori 5856fe4429 table: kill GetPathListByPeer()
when a peer is down, use paths in its adj table instead of searching
for the global table.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-08-26 10:26:07 +09:00
FUJITA Tomonori d9fc69e50a server: add addpath api leak test
test uuid map leak with implict withdraw.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-08-06 22:05:09 +09:00
FUJITA Tomonori da536952b3 server: fix DeletePath() memory leak
DeletePath() doesn't delete the entry of the map for UUID.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-08-05 13:34:43 +09:00
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