FUJITA Tomonori
be9918a163
remove label allocation completely
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-11-03 02:49:59 -07:00
FUJITA Tomonori
c7653aa9d4
allow add local route with specific mpls label
...
Also don't allocate label for local routes. The label management needs
to work with other components rather than bgp.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-11-03 02:49:59 -07:00
Wataru Ishida
1f4a3192af
cli/api: support getting table summary information
...
$ gobgp global rib summary -a ipv4
$ gobgp neighbor 10.0.0.1 local summary
$ gobgp neighbor 10.0.0.1 adj-in summary
$ gobgp neighbor 10.0.0.1 adj-out summary
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-16 14:07:06 +00:00
Wataru Ishida
c8ad82704c
server: fix error propagation
...
creating new `err` variable prevents proper error propagation which
leads to wrongly contine reading BGP messages even after receiving
an invalid update message.
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-13 06:04:17 +00:00
FUJITA Tomonori
2ad40c3f1e
server: handle management requests quicker under heavy load
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-10-12 12:47:07 +09:00
Wataru Ishida and FUJITA Tomonori
614746ca11
*: support long lived graceful restart
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-09 07:18:13 -07:00
Wataru Ishida and FUJITA Tomonori
6b6f6974fc
*: Notification support for BGP GR
...
implement draft-ietf-idr-bgp-gr-notification-07
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-09 07:15:08 -07:00
Wataru Ishida
bdcb16900e
server: stop appending 0 in Path.VrfIds
...
specifying VrfId is not mandatory
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-04 04:15:52 +00:00
Wataru Ishida
c2ad9462d6
server: fix bug of withdrawal handling
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-04 04:08:35 +00:00
Wataru Ishida and FUJITA Tomonori
00766731ad
zebra: support passing vrf-id
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-03 17:04:53 -07:00
FUJITA Tomonori
680ad99675
server: support zebra protocol vrfid with vpnv4/vpnv6
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-10-01 02:01:34 -07:00
FUJITA Tomonori
d79b23967a
server: add vrf support to bestpath watch
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-09-30 20:44:12 -07:00
FUJITA Tomonori
dfe1b71fd2
api: add id to VrfRequest
...
to support VRF ID for Zebra Protocol v3.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-09-30 05:50:25 -07:00
kishiguro and FUJITA Tomonori
36ea117e74
Apply previous change's to test as well.
2016-09-29 16:29:15 -07:00
kishiguro and FUJITA Tomonori
554f309c90
Support of ZAPI version 3 (handles VRF ID).
2016-09-29 16:29:15 -07:00
Wataru Ishida
c790472dad
server/table: don't modify/delete path attributes for route server client
...
RFC7947 2.2 says
Optional recognized and unrecognized BGP attributes, whether transitive
or non-transitive, SHOULD NOT be updated by the route server
(unless enforced by local IXP operator configuration) and SHOULD be passed
on to other route server clients
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-16 09:45:24 +00:00
Wataru Ishida and FUJITA Tomonori
10142c11f9
server/table: fix a bug of vrf route injection
...
regression due to 43dc07d723
before:
$ gobgp vrf add vrf01 rd 100:100 rt both 100:100
$ gobgp vrf vrf01 rib add 10.0.0.0/24
$ gobgp global rib -a ipv4
Network Next Hop AS_PATH Age Attrs
*> 10.0.0.0/24 0.0.0.0 00:00:19 [{Origin: ?} {Extcomms: [100:100]}]
after:
$ gobgp vrf add vrf01 rd 100:100 rt both 100:100
$ gobgp vrf vrf01 rib add 10.0.0.0/24
$ gobgp global rib -a ipv4
Network not in table
$ gobgp global rib -a vpnv4
Network Labels Next Hop AS_PATH Age Attrs
*> 100:100:10.0.0.0/24 [16000] 0.0.0.0 00:00:19 [{Origin: ?} {Extcomms: [100:100]}]
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-13 00:49:17 -07:00
Vincent Bernat and FUJITA Tomonori
8c11fdfd0f
server: portability fix for setsockopt() on Linux
...
On some architecture, setsockopt() is a multiplexed syscall and is not
available directly (for example, on i386). Instead of invoking the
syscall directly, use syscall.SetsockoptString() which is safe as strings
are not null-terminated with Go.
On BSD, use syscall.SetsockoptInt(), but I don't know if there are
architectures with the same limitations as for Linux.
Signed-off-by: Vincent Bernat <[email protected] >
2016-09-12 23:48:02 -07:00
Wataru Ishida and FUJITA Tomonori
83b6f07be7
test: test monitor feature in unit test instead of scenario test
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-12 23:08:18 -07:00
FUJITA Tomonori
48bc1ed7a6
mrt: fix rotation and dump interval handling in table mode
...
Having two interval options easily confuse users. With this, either
can be specified.
If you specify the rotation interval, gobgpd dumps a table and rotates
a log file every the rotation interval.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-09-01 22:02:36 +09:00
FUJITA Tomonori
eef1fc0a75
add RemoteRouterId to config.NeighborState
...
Stop using config.NeighborState's Description in a hacky way for the
remote Router Id.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-26 18:15:03 +09:00
FUJITA Tomonori
982a5b448f
zebra: add grpc api
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-26 17:29:38 +09:00
Wataru Ishida and FUJITA Tomonori
b3c874da25
server/api: fix GetRib API to return sorted destination
...
the feature has been broken.
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida and FUJITA Tomonori
a17ee18e5b
server: fix RIB lookup with longer-prefixes option
...
the feature was somehow broken.
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida and FUJITA Tomonori
17331d161f
server: handle error of net.ParseCIDR()
...
invalid key could crash BgpServer
2016-08-25 15:53:14 +09:00
Peng Xiao and FUJITA Tomonori
b0bead46c8
fixed some misspell error
...
Signed-off-by: Peng Xiao <[email protected] >
2016-08-21 08:29:42 +09:00
ISHIDA Wataru and FUJITA Tomonori
41ef4e2d77
Revert "server: add missing default policy setting in (*BgpServer).Start()"
...
This reverts commit 7bf91ea437 .
This commit causes misleading error message "failed to get policy info"
when global policy is configured at startup.
2016-08-17 23:32:05 +09:00
FUJITA Tomonori
60241ab6ad
server: passive tcp md5 support on OpenBSD
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-17 13:29:00 +09:00
FUJITA Tomonori
a730f029aa
server: add debug messages about tcp md5
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-17 10:04:19 +09:00
FUJITA Tomonori
a0cfb2edcd
server: support passive md5 and ttl on *bsd
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-17 10:04:19 +09:00
FUJITA Tomonori
477b035bf4
server: move linux specific functions to sockopt_linux.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-15 18:53:34 +09:00
FUJITA Tomonori
2c12fa2b92
mrt: support per-peer table dump with route server configuration
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-15 09:24:49 +09:00
FUJITA Tomonori
411bf84633
support mrt table dump (TABLE_DUMPv2 format)
...
Only global rib dumping is supported for now.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-14 07:51:42 +09:00
FUJITA Tomonori
3a3086c1f4
server: fix handling the best path change from ebgp to ibgp
...
We have the best path from ebgp and advertise it to an ibgp peer. Then
we got the new best from ibgp and then we have to explicitly withdraw
the old best (and don't send the new best from ibgp to the ibgp peer).
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-11 16:12:12 +09:00
ISHIDA Wataru
7bf91ea437
server: add missing default policy setting in (*BgpServer).Start()
...
policy.Reset() won't initialize global policy unless we pass a map
with key table.GLOBAL_RIB_NAME
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-08 00:47:05 +00:00
ISHIDA Wataru and FUJITA Tomonori
b5e49f1319
server: fix advertising multiple local withdrawals with same prefix
...
a bug introduced by 3327661896
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-03 12:09:07 +09:00
FUJITA Tomonori
0082b4889e
move policyMutex to policy/
...
It's more logical.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-03 05:52:31 +09:00
FUJITA Tomonori
6f3d90f80c
server: unify setPolicyByConfig and handlePolicy
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-03 05:46:58 +09:00
ISHIDA Wataru and FUJITA Tomonori
1890b4c5ef
config: support unnumbered bgp peering
...
from configuration file:
```toml
[[neighbors]]
[[neighbors.afi-safis]]
neighbor-interface = "eth0"
peer-as = 65000
```
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-02 10:48:58 +09:00
FUJITA Tomonori
0d53551b0a
server: UpdateNeighbor() needs address parameter checking
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-01 03:42:02 +09:00
FUJITA Tomonori
848dcec1f7
server: fix wrong log message
...
Fix the regression due to c4fe45902e
Also switch from Fatal from Warn.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-31 14:54:01 +09:00
dsp and FUJITA Tomonori
c4fe45902e
all logging is done with log.WithFields
...
Signed-off-by: dsp <[email protected] >
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-30 12:17:37 +09:00
ISHIDA Wataru and FUJITA Tomonori
7e74c11fdd
config: simplify ipv6 link local address peering
...
from cli:
```
gobgp neighbor add fe80::902f:4eff:fe52:6985%eth0 as 65000
```
from configuration file:
```toml
[[neighbors]]
[[neighbors.afi-safis]]
[neighbors.config]
neighbor-address = "fe80::902f:4eff:fe52:6985%eth0"
peer-as = 65000
```
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
ISHIDA Wataru and FUJITA Tomonori
59997e8daa
server: move default config setting logic inside BgpServer's methods
...
We have three ways to configure gobgp. config file, grpc api and native lib.
Every methods eventually call (*server.BgpServer).Start() or
(*server.BgpServer).AddNeighbor() when starting bgp server or adding
neighbors.
This commit moves default config setting logic inside them to remove
redundant code in grpc_server.go and simplify the usage of native lib.
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
ISHIDA Wataru and FUJITA Tomonori
e97a59c539
config: curve out code specific to default neighbor config setting
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-07-29 16:31:35 +09:00
FUJITA Tomonori
af98780240
move grpc_server.go from server/ to api/
...
Now all gRPC code was moved to api/.
server/ isn't dependent on gRPC anymore.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-29 00:43:52 +09:00
FUJITA Tomonori
2a552a49b4
remove unused GrpcRequest and GrpcResponse
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-29 00:32:06 +09:00
FUJITA Tomonori
9e6fede3f4
fix RPKI gRPC API
...
fix c3560d1224 regression.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-29 00:10:24 +09:00
FUJITA Tomonori
0147728f77
move gRPC-related code for SoftReset to grpc_server.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-29 00:07:26 +09:00
FUJITA Tomonori
c3560d1224
move gRPC-related code for RPKI to grpc_server.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-28 20:47:01 +09:00