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
d46da74d4f
policy: support large-community match/action
...
close #1133
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-10 05:18:17 +00:00
Wataru Ishida and FUJITA Tomonori
2cd0de0139
policy: fix bug of handling multiple prefix-match with same IP prefix.
...
fix handling of prefix-match configuration like below
[[defined-sets.prefix-sets]]
prefix-set-name = "ps1"
[[defined-sets.prefix-sets.prefix-list]]
ip-prefix = "0.0.0.0/0"
masklength-range = "0..7"
[[defined-sets.prefix-sets.prefix-list]]
ip-prefix = "0.0.0.0/0"
masklength-range = "25..32"
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-09 21:57:31 -07: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
Vincent Bernat and FUJITA Tomonori
ddb9303bb5
table: ensure compatibility with archs where int == int32
...
MED actions are expected to be int64 and AS are expected to be
uint32. Use ParseInt/ParseUint instead of Atoi for those until the tests
pass on ARM.
2016-10-08 06:11:08 -07:00
Wataru Ishida
cda8d873fa
packet/bgp: fix handling of IPv4 mapped IPv6 prefixes
...
closes #1117
Signed-off-by: Wataru Ishida <[email protected] >
2016-10-04 04:03:46 +00: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
FUJITA Tomonori
a042bb3bf8
table: MP_UNREACH_NLRI shouldn't carry any other path attributes
...
RFC4760 says:
An UPDATE message that contains the MP_UNREACH_NLRI is not required to
carry any other path attributes.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-09-28 18:35:39 -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
Wataru Ishida and FUJITA Tomonori
a795d2452a
table: fix route filtering with IP address
...
close #1081
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-13 00:49:17 -07:00
Wataru Ishida and FUJITA Tomonori
1156fc33fa
cli/table: support filtering of IPv4/IPv6 MPLS routes
...
close #1086
Signed-off-by: Wataru Ishida <[email protected] >
2016-09-13 00:49:17 -07:00
Wataru Ishida and FUJITA Tomonori
c8bb5752f6
table: add Best/MultiPath option to SelectOption
...
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +09:00
Wataru Ishida and FUJITA Tomonori
3235c0618c
api/cli: kill cmd package custom path/destination structs
...
reuse table package
Signed-off-by: Wataru Ishida <[email protected] >
2016-08-25 15:53:14 +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
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
e03a8b1c57
policy: fix global default policy initialization
...
Allow all routes coming in and going out by default
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-17 23:32:05 +09:00
ISHIDA Wataru and FUJITA Tomonori
cd4b0107c3
policy: support route-type condition
...
// match with routes locally generated
$ gobgp policy statement s0 add condition route-type local
// match with routes received from eBGP peers
$ gobgp policy statement s0 add condition route-type external
// match with routes received from iBGP peers
$ gobgp policy statement s0 add condition route-type internal
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-08-17 21:23:08 +09:00
FUJITA Tomonori
fc7bf04899
table: make some RoutingPolicy methods unexported
...
All the exported methods are properly serialized with mutex.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-08-03 05:53:52 +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
55f473d7fe
gobgp: support mrt injecting only best paths
...
$ gobgp mrt inject global --only-best your-mrt-dump-file
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-31 16:31:50 +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
FUJITA Tomonori
43dc07d723
move gRPC-related code for REQ_ADD_PATH and REQ_DELETE_PATH to grpc_server.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-21 13:23:15 +09:00
FUJITA Tomonori
4635014cbb
remove gRPC dependency from table/
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-20 06:50:15 +09:00
FUJITA Tomonori
f27afac154
move gRPC-related code in path.go and destination.go to grpc_server.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-20 04:25:25 +09:00
FUJITA Tomonori
e090609b14
move gRPC-related code in vrf.go to grpc_server.go
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-20 04:25:25 +09:00
FUJITA Tomonori
e88a82ed50
table: remove ToApiStruct methods from policy.go
...
Preparation for removing gRPC dependency.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-07-20 04:25:25 +09:00
Ben Agricola and FUJITA Tomonori
dcdc6f7a05
Fix longer-prefix search using radix trie walk
...
Bug-Url: #1006
Signed-off-by: Ben Agricola <[email protected] >
2016-07-11 18:52:33 +09:00
FUJITA Tomonori
c5b7496d0b
fix support AGGREGATOR and AS4_AGGREGATOR conversion
...
Fix the following commit:
commit de58be4411
Author: FUJITA Tomonori <[email protected] >
Date: Sun Jun 26 23:18:23 2016 +0900
support AGGREGATOR and AS4_AGGREGATOR conversion
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-28 12:26:47 +09:00
FUJITA Tomonori
52f36b683c
add AGGREGATOR and AS4_AGGREGATOR conversion test
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-27 00:35:16 +09:00
FUJITA Tomonori
de58be4411
support AGGREGATOR and AS4_AGGREGATOR conversion
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-26 23:18:23 +09:00
FUJITA Tomonori
b8f83f8ede
drop unknown optional non-transitive attributes
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-13 20:41:40 +09:00
ISHIDA Wataru and FUJITA Tomonori
5c7df67266
server/table: support bgp multipath
...
This patch adds multiPathList field to watcherEventBestPathMsg and
fills it when global.use-multiple-paths.config.enable = true
Following patches add support injecting multipath to zebra and
monitoring it via gRPC
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-06-06 12:43:20 +09:00
ISHIDA Wataru and FUJITA Tomonori
222d4dba8e
table: return default value(100) when local-pref attr doesn't exist
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-06-06 12:43:20 +09:00
FUJITA Tomonori
b13c09baa6
table: fix leftmostAS() in compareByMED
...
Needs the first AS in the AS_SEQUENCE is the same for multiple
paths. Any preceding AS_CONFED_SEQUENCE is ignored.
Also rename the function name to 'firstAS'.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-06-03 11:20:50 +09:00
FUJITA Tomonori
315a553ec1
table: fix creation of update message from path with multiple NLRIs
...
Fix a bug that gobgp creates a wrong update message from path having
MP_REACH with multiple NLRIs. gobgp always allocates a path per NRLI
(that is, multiple paths from an update message having MP_REACH with
multiple NLRIs).
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-31 09:49:00 +09:00
FUJITA Tomonori
25e14f8598
table: use path Equal method in adj rather than homegrown funciton
...
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-29 20:27:25 +09:00
FUJITA Tomonori
ebb2c9727a
table: fix to compare new best path with old best path
...
The current code uses Path.Equal(), which just check out if pathes are
idential. However, it doesn't work for two cloned pathes of a path
(soft update in case).
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-29 19:42:47 +09:00
FUJITA Tomonori
ae80d1bf86
Revert "table: fix to compare new best path with old best path"
...
This reverts commit 74c0527dda .
Fix this in a different way.
2016-05-29 19:25:35 +09:00
FUJITA Tomonori
43e015854c
table: make clear function to sort paths
...
We want to check out if two pointers are same or different here. Make
the code clear.
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-29 19:23:26 +09:00
FUJITA Tomonori
74c0527dda
table: fix to compare new best path with old best path
...
The current code uses Path.Equal(), which just check out if pathes are
idential. However, it doesn't work for two cloned pathes of a path
(soft update in case).
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-29 04:20:05 +09:00
ISHIDA Wataru and FUJITA Tomonori
70434c96d2
policy: add support setting self ip address as next-hop
...
from configuration file
[policy-definitions.statements.actions.bgp-actions]
set-next-hop = "self"
from cli
$ gobgp policy statement stmt1 add action next-hop self
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-26 23:19:04 +09:00
ISHIDA Wataru
0dbf1d87cb
policy: add local-pref action
...
$ gobgp policy statement st01 add action local-pref 110
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-25 02:53:42 +00:00
FUJITA Tomonori
7c42e295e2
add collector feature
...
dump the update messages and the state change of peers into influxdb:
[collector.config]
url = "http://localhost:8086 "
db-name = "gobgp"
Signed-off-by: FUJITA Tomonori <[email protected] >
2016-05-23 20:32:47 +09:00
ISHIDA Wataru and FUJITA Tomonori
a7521827e1
server/table: fix intra-AS RTC route distribution
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-23 09:46:53 +09:00
ISHIDA Wataru and FUJITA Tomonori
31342564c9
table: fix UpdatePathAttrs() to obey RFC4684
...
Signed-off-by: ISHIDA Wataru <[email protected] >
2016-05-23 09:46:53 +09:00