59 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
Emil PalmandFUJITA Tomonori 671dc0d94a Add Versioning support 2019-06-03 21:25:01 +09:00
Christoph Heiss e214d7ac24 Fix cli crash when showing neighbor stats as list.
If the gRPC-server has TLS enabled, but the cli is used without TLS,
it crashes when listing neighbors with a segfault due to an unhandled
error.
2019-05-16 10:07:52 +02: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
Carl BaldwinandFUJITA Tomonori cc267fad9e Consolidate duplicate code blocks both updating peer groups
There were only two differences: 1) the first block updates
`updatePolicy` and 2) the log statements are a little bit different
(`pg.State` vs `pg.Config` and `%v` vs `%s`).

To be consistent with the other blocks above it, changed to use
`pg.Config` rather than `pg.State`.
2019-05-02 19:39:07 +09:00
JieJhih JhangandFUJITA Tomonori 42feaea2a0 cmd/gobgp: Parse evpn IPMSI parameter 2019-04-11 07:30:35 +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 275966f6cf Use Itoa method instead sprintf 2019-03-26 07:44:02 +09:00
JieJhih JhangandFUJITA Tomonori 80ff3a325c support BMP sysName and sysDescr configuration 2019-03-25 20:11:44 +09:00
Nasato GotoandFUJITA Tomonori c86c924bb3 cmd/gobgp: fix RPKI result in neighbor policy command 2019-03-24 21:17:59 +09:00
Robin DouineandFUJITA Tomonori 7bb72b7ad0 cmd/gobgp: use sd_notify protocol to notify the status change to systemd 2019-03-14 21:51:08 +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
FUJITA Tomonori bc73604d4c cmd/gobgp: fix non existing neighbor crash
Fixes some crash bugs when non existing neighbor is specified.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-02-18 10:22:23 +09:00
FUJITA TomonoriandFUJITA Tomonori aaa71b1bf4 cmd/gobgp: fix policy printing
make policy printing same with v1.x

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-02-16 19:19:01 +09:00
Thomas Rosenstein a22897a0af [Fix #1967] Fix print statement 2019-02-12 11:18:57 +01:00
FUJITA Tomonori 391fee9997 cmd/gobgp: make listing of prefix set identical to version 1.X
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-02-08 22:21:57 +09:00
Thomas RosensteinandFUJITA Tomonori 1b57495ae9 Fix listing of prefix set in gobgp cli 2019-02-08 21:59:06 +09:00
FUJITA Tomonori 1f4a12d065 cmd/gobgp: remove in policy debris
$ gobgp n 10.0.255.1 p
invalid policy type: choose from (in|import|export)

The in policy was removed long ago.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-27 22:28:41 +09:00
FUJITA Tomonori 4660a6bf88 cmd/gobgp: fix showingglobal policy
Needs to specify the global rib name for ListPolicyAssignment API.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-27 21:38:07 +09:00
FUJITA Tomonori e0e0f5a1eb gobgpd: fix the initial global policy configuration from config file
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-27 21:34:49 +09:00
FUJITA Tomonori 1e133bd501 gobgp: fix vrf rib command crash
showNeighborRib() executes net.ParseCIDR() for vrf prefix like
10.100:100:10.0.0.0/24 and then crashes.

Probably ListRib() API should support an option to return sorted
destinations.

Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-26 21:36:39 +09:00
Artur MakutunowiczandFUJITA Tomonori 192480fc71 Add experimental BGP-LS feature 2019-01-26 12:40:45 +09:00
FUJITA Tomonori 1d14b8ecfb silence staticcheck warnings
Signed-off-by: FUJITA Tomonori <[email protected]>
2019-01-09 14:36:48 +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 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 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
Sergey Elantsev ae52d60935 typo fix 2018-11-24 13:39:25 +03: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 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 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
Carl Baldwin 7923913582 Add quotes to short option value
This broke vet for me. Not sure why it didn't break in CI.
2018-11-14 11:37:47 -07:00
Eiichiro WatanabeandFUJITA Tomonori fa387c9065 Fix Statistics Report in BMP 2018-11-14 19:32:24 +09:00
FUJITA Tomonori 9cad94f3ba cmd/gobgp: don't use timeout context for requests
timeout context is for only connecting. We should refactor the code to
avoid global context variant.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-12 22:07:01 +09:00
Eiichiro WatanabeandFUJITA Tomonori 0eb3dcede5 Fix intervals for MRT 2018-11-12 21:32:07 +09:00
FUJITA Tomonori 076d019b75 make gRPC server private
No need to be exported.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-09 19:10:43 +09:00
Yoichi HariguchiandFUJITA Tomonori 6cc82ff503 added timestamp 2018-11-09 09:52:51 +09:00
FUJITA Tomonori 96c129e5d0 gobgp: merge cmd package into main
Make everything private.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-07 17:30:48 +09:00
FUJITA Tomonori 4c66cd4f91 gobgp: unexport cmd/
Only stuff in pkg/ should be exported.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-07 17:30:48 +09:00
FUJITA Tomonori 2ed0b9659f gobgp: replace deprecated grpc WithTimeout
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-07 12:24:43 +09:00
FUJITA Tomonori e82327118a gobgp: delete c-shared-lib
Now the gRPC API doesn't require the binary wire-format for path
attributes. No need for the library for C.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-11-06 20:58:19 +09:00
FUJITA Tomonori 3e950780fe move NewAPIRoutingPolicyFromConfigStruct() from server/
The config is an internal package so it should not be exported.
    
NewAPIPolicyAssignmentFromTableStruct() is approprate for config/.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-10-28 21:41:11 +09:00
FUJITA Tomonori 5d7ecf5a9e move NewAPIPolicyAssignmentFromTableStruct() from server/
The table is an internal package so it should not be exported.

NewAPIPolicyAssignmentFromTableStruct() is approprate for table/.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-10-28 21:36:37 +09:00
FUJITA Tomonori d032c3153e move exported functions to generate api structs from config struct in server/
NewPeerFromConfigStruct()
NewPeerGroupFromConfigStruct()
NewGlobalFromConfigStruct()

The config is an internal package so they should not be exported.

We will remove the usage of the config in server/. This is a part of
the goal.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-10-28 21:25:49 +09:00
wanghonghao 94e70ba60a cli: fix nil pointer in showNeighbor 2018-09-19 12:01:18 +08:00
Mikael MagnussonandFUJITA Tomonori 9420a664c2 cli: Support Color Extended Community
This patch enables support for Color Extended Community in the CLI.

Usage Example:
$ gobgp global rib add -a ipv4 10.0.0.0/24 color 10
$ gobgp global rib -a ipv4

   Network              Next Hop             AS_PATH              Age        Attrs
*> 10.0.0.0/24          0.0.0.0                                   00:00:00   [{Origin: ?} {Extcomms: [10]}]

Signed-off-by: Mikael Magnusson <[email protected]>
2018-09-12 21:50:29 +09:00
FUJITA Tomonori 475818dd3c api: remove unused members
fixes #1816

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 22:14:41 +09:00
FUJITA Tomonori 97ad6b32ee api: change Family
fixes #1812

Avoid the cast and use strightforward data strcuture; two variables
for afi and safi instead of squashing two into one variable.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-28 15:36:50 +09:00
FUJITA Tomonori 008c961ecd policy cleanup
- remove ReplaceDefinedSet and ReplaceStatement APIs; not intutive and
  should create a new one instead of modifying the existing.

- Rename ReplacePolicyAssignment to SetPolicyAssignment API; we use
  internally SetPolicy() name from the beginning.

- Rename UpdatePolicy() to SetPolicies() API; It doesn't update
  anything so the name is confusing. It discards the all policies and
  create policies from the argument.

- Changes some member names in structures for policy.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-23 10:05:19 +09:00