Age | Commit message (Collapse) | Author |
|
https://github.com/golang-standards/project-layout
Now you can see clearly what are private and public library code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
the same array
|
|
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, only IPv4 address is acceptable for the CLUSTER_ID setting,
this patch enables to specify the CLUSTER_ID as a 32-bit unsigned
integer.
With this expansion, "Config.RouteReflectorClusterId" stores the raw
configured value for the CLUSTER_ID and "State.RouteReflectorClusterId"
stores the value used for construct the CLUSTER_LIST attribute.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch enables to configure VRF tables by using config file. This
feature is useful when using VRF-Neighbor feature.
Example of Usage:
```toml
[[vrfs]]
[vrfs.config]
name = "vrf1"
id = 1
rd = "65000:100"
both-rt-list = ["65000:100"]
```
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently "0.0.0.0" is the default of "route-reflector-cluster-id" and
this patch fixes to use "router-id" as its default value.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
default.go and serve.go has some functions which are not directly
related to its main role.
This commit moves those functions to util.go, a more suitable place.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
The commit ab953211 prohibits the unconfigured peer ASN but it breaks
the unnumbered BGP feature. The old behavior needs to be reverted.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Currently, the config of PeerGroup members are not set properly.
For example, if LocalAs of the neighbor is not set in the config file,
LocalAs will be set to Global.As as a default value.
After this, however, if the neighbor is a member of a peer group,
LocalAs will be unexpectedly overwritten by the peer group config.
This commit fixes this by setting default values after
applying the peer group config.
Adding to this, this commit avoids unnecessary applying
the peer group config.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
In neighbor config, there are some parameters whose
default value can be changed depending on the global config.
This commit modifies the argument of config.SetDefaultNeighborConfigValues()
to pass the global config. It enables to change the default
settings of neighbor depending on the global config.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
RFC7606 updates some other RFC and says that BGP speakers
should not send NOTIFICATION for some errors in received UPDATE.
Thus, treat-as-withdraw should be true as a default value.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This patch introduce "add-paths" structure per AFI-SAFI in order to
enable to store add-paths feature config/state per AFI-SAFI.
Also, this patch renames a few variables to avoid the name collisions.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
To reduce the translations of "AfiSafiName" into "bgp.RouteFamily", this
patch introduces "Family" field into "AfiSafiState" and stores the
translated value.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, the function for setting the default values for neighbors
will called doubly when the neighbor config was added via local config
files (called by "config/serve.go" and AddNeighbor() in
"server/server.go").
This patch enables to detect the duplicated call of this function and
avoid setting the unexpected default values.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, if "neighbors.afi-safis.config.enabled" is omitted, this
field will not initialised as expected when GoBGPd reads config file,
but will initialised when AddNeighbor API is called.
This cause the miss comparison whether reloaded neighbor config is
updated or not (always determined updated).
This patch fixes the condition more strictly and solves this problem.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
If State.NeighborAddress is not set, setting default configs
for the dynamic peers will fail. This patch set State.NeighborAddress
before setting default configs.
And this patch avoids overwriting State.NeighborAddress if it is set.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
By introducing dynamic neighbor feature,
GoBGP can have dynamic neighbors,
and corresponding Config.NeighboAddress can be empty.
This patch sets State.NeighborAddress for all neighbors,
and gets the neighbor's address from them.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This patch enables to create peer-groups,
also supports dynamic configuration to peer-groups.
Manually set fields in neighbor configs have priority over its peer-group's config,
except some fields, like "peer-as", or "minimum-advertisement-interval" and so on.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Currently, the restarting speaker ends restarting procedure
before receiving End-of-Rib markers from all helper speakers.
It is because `MpGracefulRestart.State.Enabled` is not initialized,
always evalueted to false, so the restarting speaker misunderstands
as there is not helper speaker.
This patch adds code to initialize `MpGracefulRestart.State.Enabled`.
This fixes #1296.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This patch suppose the default interval of the BMP stats reports is
0 which disable this feature and the range of this interval is 15
though 65535 seconds to follow Junos OS configuration.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
we use the term replace-peer-as instead of as-override
since openconfig is using it.
cli
```
$ gobgp n add <neighbor-addr> as <asn> replace-peer-as
```
config
```
neighbor:
config:
peer-as: <asn>
neighbor-address: <neighbor-addr>
as-path-options:
config:
replace-peer-as: true
```
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
cli
```
$ gobgp n add <neighbor-addr> as <asn> remove-private-as (all|replace)
```
config
```
neighbor:
config:
peer-as: <asn>
neighbor-address: <neighbor-addr>
remove-private-as: all
```
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
RFC4271 9.1.2 Phase 2: Route Selection
If the AS_PATH attribute of a BGP route contains an AS loop, the BGP
route should be excluded from the Phase 2 decision function. AS loop
detection is done by scanning the full AS path (as specified in the
AS_PATH attribute), and checking that the autonomous system number of
the local system does not appear in the AS path. Operations of a BGP
speaker that is configured to accept routes with its own autonomous
system number in the AS path are outside the scope of this document.
Also this commit adds support for allow-own-as option to relax this.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
This patch fixes a bug of export policy and implicit withdrawal.
When a path is filtered by export policy, we need to check whether the
old path (implicit withdrawn path) was sent before the new path.
If it has been sent, we need to send a withdrawal message.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
since BGP unnumbered peers are typically trusted, skip asn negotiation
for easy configuration.
from configuration file:
```toml
[[neighbors]]
[[neighbors.config]]
neighbor-interface = "eth0"
```
from cli:
```
$ gobgp neighbor add interface eth0
```
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
For configuring the Nexthop Tracking features with ZClient, this patch
adds the config values:
- "nexthop-trigger-enable" enables to the Nexthop Tracking features.
Please note this features is only available with version 3 or later,
and "true" by the default with that version.
- "nexthop-trigger-delay" specifies the delay sec to update the
nexthops triggered by the events from Zebra daemon. The default is
5 secs and the same with the default of Cisco's routers.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
before:
```yaml
actions:
route-disposition:
accept-route: true
reject-route: false
```
after
```yaml
action:
router-disposition: accept-route
```
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Due to this bug, the description isn't set.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
from configuration file:
```toml
[[neighbors]]
[[neighbors.afi-safis]]
neighbor-interface = "eth0"
peer-as = 65000
```
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
bug introduced by e97a59c5390fc05ba75673fb4ff7e061c1e73e4f
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
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 <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Local address of md5ed active connection was hard-coded as "0.0.0.0".
Let's set appropriate default local address (0.0.0.0 or ::) in
SetDefaultConfigValues() and clean up (*FSM).connectLoop() instead of
ad-hoc connectLoop() fix.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
- split config and state
- move to Bgp structure (aligned with Rpki, Bmp, and Mrt)
Also makes zebra configured via GRPC channel.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|