388 Commits
Author SHA1 Message Date
ISHIDA Wataru 84c164a89c bmp: detect bmp connection lost earlier and recover earlier
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-30 01:42:46 +09:00
ISHIDA Wataru 30a072030d server: just send global rib once when bmp connection is initialized
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-30 01:42:46 +09:00
ISHIDA Wataru d01c1586b9 config: use viper and support multiple configuration formats
// toml by default
$ gobgpd -f gobgpd.toml

// use -t to change configuration type
$ gobgpd -t yaml -f gobgpd.yaml

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-29 14:47:06 +09:00
ISHIDA Wataru 58946b7924 config: make config/state variable name simple
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-28 21:02:03 +09:00
FUJITA Tomonori 7a2b395116 add MOD_PATH API
Handle only one route unlike MOD_PATHS API. When the API returns an
uuid when a route is created. The uuid can be used to remove the route
later.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-26 19:24:46 -08:00
FUJITA Tomonori 01157e466a rename ModPath to ModPaths
ModPath API to modify multiple paths so let's use more an appropriate name.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-25 20:58:18 -08:00
FUJITA Tomonori c9a3fad2bd table: refactor handleModPathRequest
Support the api for modifying single path with uuid.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-25 20:47:34 -08:00
FUJITA Tomonori 586ec66e97 rpki: 'rpki server' command shows port
Session                 State  Uptime     #IPv4/IPv6 records
210.173.170.254:323     Up     00:01:39   17112/2517
141.22.28.222:8282      Up     00:01:39   17411/2604

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-24 15:38:00 -08:00
ISHIDA Wataru c0e0aafa74 gobgpd/gobgp: change grcp port to 50051 from 8080
also add an option to change grpc port

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-22 15:29:29 +09:00
ISHIDA Wataru 406efffa74 *: add global listen port configuration
if port < 0, gobgpd won't listen on tcp:179

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-21 19:28:25 +09:00
FUJITA Tomonori 96a8b4c285 bmp: send post-policy routes when connected to bmpd
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-18 01:17:08 -08:00
FUJITA Tomonori ac5b505290 rpki: sort ROA results
Sort the results in order of prefix, maxlen, as, and roa server.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-17 23:38:26 -08:00
FUJITA Tomonori 52ce66ef71 rpki: support reset/softreset/enable operation
gobgp rpki server <ip address> reset|softreset|enable

reset: close a tcp conneciton and retry to connect and send ResetQuery
softreset: send ResetQuery
enable: send SerialQuery

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-17 18:44:13 -08:00
FUJITA Tomonori 1b5d53c411 rpki: remove unused member
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-17 15:50:54 -08:00
FUJITA Tomonori 319a874338 rpki: avoid creating duplicating roa entry
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-17 15:43:26 -08:00
FUJITA Tomonori bbc640470e rpki: support multiple roa servers
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-17 15:31:48 -08:00
FUJITA Tomonori c8a3caacf3 bmp: support post-policy routing monitoring
"RouteMonitoringPolicy" option added:

0: pre-policy (by default)
1: post-policy
2: both

=
[BmpServers]
  [[BmpServers.BmpServerList]]
    [BmpServers.BmpServerList.BmpServerConfig]
      Address = "127.0.0.1"
      Port = 11019
      RouteMonitoringPolicy = 2

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-16 15:35:31 -08:00
FUJITA Tomonori ef1c084c2c server: fix softresetout to send withdrawn for only routes in adj-out
This fixes softresetout to send withdrawn updates for only routes in
adj-out.

Currently, softreset sends withdrawn updates for ALL routes rejected
by export policy. The problem is, even if export policy is configured
to rejecte any routes, softreset sends withdrawn updates.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-15 22:28:27 -08:00
ISHIDA WataruandFUJITA Tomonori ea45280cfb policy: don't allow configure/show per-peer policy for non-rs-client
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 05:00:41 -08:00
ISHIDA Wataru d6148c75a3 api: refactor afisafi api
remove unused fields

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 18:26:32 +09:00
FUJITA Tomonori 1b386f627f server: fix IMPORT POLICY handling for newly added peers
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-15 15:32:13 +09:00
FUJITA Tomonori 8891f47b12 server: avoid as loop check in filterpath() for rs peer
We don't import as loop path into rs peer's table. So no need to check
again.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-15 12:10:43 +09:00
ISHIDA WataruandFUJITA Tomonori 75f495731b server: add error handling of invalid router-id
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 12:09:43 +09:00
ISHIDA WataruandFUJITA Tomonori ad3850170c server: enable to change grpc server port
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 12:06:53 +09:00
ISHIDA WataruandFUJITA Tomonori a4cd60e31d server: support Neighbor.Trasnport configuration via grpc
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 12:06:49 +09:00
ISHIDA WataruandFUJITA Tomonori 14cd6c9727 server: ensure bmpClient is not nil when BgpServer is running
when gobgp/server used as a bgp library, current implementation can leave
bmpClient nil.

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 12:06:46 +09:00
ISHIDA WataruandFUJITA Tomonori 38da8bb562 server: ensure global config is finished before any other config
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-15 12:06:40 +09:00
FUJITA Tomonori ac6af737a7 server: don't import path including looped as path
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-14 22:47:36 +09:00
FUJITA Tomonori e33c13b85a server: handle lots of peers trying to connect
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-12 23:54:24 +09:00
Naoto Hanaue db35c8b954 server: fix bug when you add a global config in grpc
Gobgp does not Initialize RoutingPolicy if GlobalConifig is configured via gRPC, this issue causes received route from Peer not added to GlobalRib.
2015-12-10 18:52:49 +09:00
Naoto Hanaue 45ae72282e server: fix bug when you add a neighbor config in grpc
Gobpg does not  set AfiSafi if NeighborConfig is configured  via gRPC, this issue causes error when Gobgp receives route from the Peer.

log of following when peer was down
```
DEBU[0009] received                                      Key=192.168.100.2 Topic=Peer data=&{Header:{Marker:[] Len:19 Type:4} Body:0xe17ff0}
WARN[0010] malformed BGP update message                  Key=192.168.100.2 Topic=Peer error=Address-family rf 65537 not avalible for session
WARN[0010] sent notification                             Data=&{Header:{Marker:[] Len:21 Type:3} Body:0xc8200117a0} Key=192.168.100.2 State=BGP_FSM_ESTABLISHED Topic=Peer
INFO[0010] Peer Down                                     Key=192.168.100.2 Reason=Peer closed the session State=BGP_FSM_ESTABLISHED Topic=Peer
DEBU[0010] state changed                                 Key=192.168.100.2 Topic=Peer new=BGP_FSM_IDLE old=BGP_FSM_ESTABLISHED
```
2015-12-10 18:50:16 +09:00
FUJITA Tomonori 71588f6a1a rpki: show ROA with server information
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-10 11:51:47 +09:00
FUJITA Tomonori e92a04c9a8 server: use ID() for path's Filter and Filtered methods instead of TableID()
Needs to use ID() for path's Filter and Filtered methods instead of
TableID(). We don't hit any bugs because:

- With a RS client, both methods returns the same.
- No IN POLICY support for non RS clients

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-09 04:54:29 -08:00
FUJITA Tomonori c806da563e table: remove useless table owner member
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-08 16:19:38 -08:00
FUJITA Tomonori c704e1eafa server: avoid sending routes with unconfigured addres family
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-08 06:30:54 -08:00
ISHIDA WataruandFUJITA Tomonori a719a3de6e server/table: use only one rib for multiple route server clients
speed up and reduce memory footprint

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-08 14:45:37 +09:00
ISHIDA Wataru ec6bcf13f1 api/cli: show all longer prefixes with longer-prefixes option
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-06 10:38:16 +09:00
ISHIDA Wataru 7ff862f3ee api/cli: support showing longer-prefix
$ gobgp global rib
    Network      Next Hop  AS_PATH  Age       Attrs
*>  10.0.0.0/24  0.0.0.0            00:00:01  [{Origin: ?}]

$ gobgp global rib 10.0.0.0/20
Network not in table

$ gobgp global rib 10.0.0.0/20 longer-prefix
    Network      Next Hop  AS_PATH  Age       Attrs
*>  10.0.0.0/24  0.0.0.0            00:00:01  [{Origin: ?}]

Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-04 11:01:07 +09:00
ISHIDA WataruandFUJITA Tomonori a36c84c510 make adj-rib implementation more clear and efficient
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-02 16:02:21 +09:00
FUJITA Tomonori acad9314f0 server: fix show rib with host address
With this fix, the RPC API works like the following:

$ gobgp global rib
    Network             Next Hop             AS_PATH              Age        Attrs
*>  210.173.160.0/19    210.173.172.65       65001                00:00:41   [{Origin: i}]

$ gobgp global rib 210.173.176.1
    Network             Next Hop             AS_PATH              Age        Attrs
*>  210.173.160.0/19    210.173.172.65       65001                00:01:17   [{Origin: i}]

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-12-02 11:25:41 +09:00
ISHIDA WataruandFUJITA Tomonori 5ceeb3da2d cli: speed up showing specific routes from global/local rib
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-02 08:53:04 +09:00
ISHIDA WataruandFUJITA Tomonori ff26d4e93b api/server: refine GetRib API
Signed-off-by: ISHIDA Wataru <[email protected]>
2015-12-02 08:53:04 +09:00
FUJITA Tomonori 13b98e40b5 server: fix dropPeerAllRoutes() to handle rf
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-27 19:06:12 -08:00
FUJITA Tomonori a1602f3a25 rpki: grpc support
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-23 23:00:18 -08:00
FUJITA Tomonori f6897fd47f rpki: fix IPv4-mapped addresss handling
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-18 21:07:45 -08:00
FUJITA Tomonori 072a0b07bd bmp: use on-wire original update data
bgpd parse on-wire original update data to construct BGPMessage object
and serialize it. Sometimes the both data is not idential. For
example, the original data sets the extended length for attribute even
if the length is less than 256.

This commit fixes the above issue.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 13:05:24 +09:00
FUJITA Tomonori 12ae1b784d mrt: use on-wire original update data for mrt
bgpd parse on-wire original update data to construct BGPMessage object
and serialize it. Sometimes the both data is not idential. For
example, the original data sets the extended length for attribute even
if the length is less than 256.

This commit fixes the above issue.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 12:42:30 +09:00
FUJITA Tomonori 515abe2880 server: fix bmp and mrt updates
Always must send updates to them.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 10:53:40 +09:00
FUJITA Tomonori 59f18c15ca use the same timestamp for bmp and mrt updates
Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-13 10:50:26 +09:00
FUJITA Tomonori 95e7cc7308 mrt: support reset/rotate commands
$ gobgp mrt update reset

create a new file or reopen the existing file and continue to write
update messages to it.

$ gobgp mrt update <filename>

rename the current logging file to <filename> and truncate the logging
file and continue to write update messages to it.

Signed-off-by: FUJITA Tomonori <[email protected]>
2015-11-12 15:01:12 +09:00