47 Commits
Author SHA1 Message Date
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
FUJITA Tomonori d6a5e9f157 pkg/server: ListPolicyAssignment() returns all assignments by default
Like other ListPolicy*() functions, if no conditions are specified,
all assignments are returned.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-18 21:32:24 +09:00
FUJITA Tomonori 0b6486f34c gobgp: fix peer state print
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-16 20:32:27 +09:00
FUJITA Tomonori 840807a520 pkg/server: public APIs use structures in api/
Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-10 09:10:44 +09:00
FUJITA Tomonori 71e56c542e rpc cleanup
- clean up RPC function names
- rewrite gobgp command to use the api instead of config package
- delete unused client package

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-08-08 21:24:48 +09:00
FUJITA Tomonori 42cc25da7a cmd/gobgp: use different grpc port for rpki_test
Sometimes fails due to listen port conflict with tests in
internal/pkg/client.

Using unix domain socket migth be a proper fix.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-14 22:38:16 +09:00
[email protected]andFUJITA Tomonori 9c591a9f32 cmd: fix error when delete policy statement
Signed-off-by: Chen Haiquan <[email protected]>
2018-07-14 18:26:51 +09:00
[email protected]andFUJITA Tomonori 179824221b cmd: implement ebgp-multihop-ttl option when add neighbor
Signed-off-by: Chen Haiquan <[email protected]>
2018-07-14 15:27:53 +09:00
FUJITA Tomonori 07f47b7d37 remove package dependency except for grpc in api/
Nothing except for protobuf IDL files and files generated by protobuf in api/.

Try to make the APIs portable to any languages.

Signed-off-by: FUJITA Tomonori <[email protected]>
2018-07-08 21:32:32 +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 <[email protected]>
2018-07-07 20:44:25 +09:00