summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
AgeCommit message (Collapse)Author
2018-07-07follow Standard Go Project LayoutFUJITA Tomonori
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>
2018-07-06Fixing all megacheck errors.FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-07-06config: Copy afi-safi objects from peer group to neighbor instead of share ↵wanghonghao
the same array
2018-06-22Fixing all megacheck errors.Jeff Bean
2018-06-05config: Improve golint resultsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-06-05config: Accept CLUSTER_ID as an integer valueIWASE Yusuke
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>
2018-05-10config: Enable to configure VRF via config fileIWASE Yusuke
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>
2018-02-16config/default: Default value of route-reflector-cluster-idIWASE Yusuke
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>
2017-12-16config: Move some functions to util.goSatoshi Fujimoto
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>
2017-11-24config: allow unconfigured peer ASNFUJITA Tomonori
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>
2017-11-08config: Properly set config of PeerGroup memberSatoshi Fujimoto
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>
2017-11-07*: Support BGP Confederations (RFC 5065)Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07config: Pass Global Config to SetDefaultNeighborConfigSatoshi Fujimoto
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>
2017-11-02zclient: Enable to connect to FRRoutingIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-10-03config/default: Set treat-as-withdraw to true as defaultSatoshi Fujimoto
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>
2017-10-03config: add-paths structure per AFI-SAFIIWASE Yusuke
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>
2017-09-14config: Introduce Family field into AfiSafiStateIWASE Yusuke
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>
2017-09-11config: Default TTL for ebgp-multihop and ttl-securityIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-24Fix incorrect default value of BMPMonitoringPolicyEiichiro Watanabe
2017-08-08config/default: Validation for "afi-safi-name"IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-08config/default: Avoid setting doubly defaults of neighborIWASE Yusuke
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>
2017-08-08config/default: Fix unfilled "neighbors.afi-safis.config.enabled"IWASE Yusuke
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>
2017-07-13config/default: Reduce parsing CIDR stringIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-23config: Add parameters for TTL SecurityIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-20peer: Set NeighborAddress before initializing dynamic peersSatoshi Fujimoto
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>
2017-06-16server: Support Dynamic NeighborSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-06-16config: Use State to get NeighborAddress instead of ConfigSatoshi Fujimoto
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>
2017-06-05*: Support Peer-Group ConfigurationSatoshi Fujimoto
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>
2017-06-05config: Initialize Graceful Restart StateSatoshi Fujimoto
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>
2017-05-22config: Add interval seconds for BMP stats reportsIWASE Yusuke
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>
2017-05-10*: support replace-peer-as (aka as-override)Wataru Ishida
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>
2017-05-10*: support remove private asWataru Ishida
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>
2017-05-09server: ignore routes when local AS is in AS_PATHISHIDA Wataru
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>
2017-04-18policy: send a withdrawal if export policy blocks an existing routeISHIDA Wataru
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>
2017-04-04skip asn negotiation for BGP unnumbered peersISHIDA Wataru
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>
2017-04-04config: enabled IPv4/IPv6 unicast for BGP unnumbered peer by defaultISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-03-27config/default: Fix the default for Zebra.Config.VersionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-03-06config: Config values for Nexthop Tracking with ZClientIWASE Yusuke
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>
2016-11-25config: fix bug of default rpki port settingWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-17config: simplify route-disposition configurationWataru Ishida
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>
2016-11-03remove label allocation completelyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-29config: stop resetting Neighbor.Config.DescriptionFUJITA Tomonori
Due to this bug, the description isn't set. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-05config: fix compile error on non-linux platformISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-08-02config: support unnumbered bgp peeringISHIDA Wataru
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>
2016-08-02config: fix error propagatation in default config settingISHIDA Wataru
bug introduced by e97a59c5390fc05ba75673fb4ff7e061c1e73e4f Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-07-29config: simplify ipv6 link local address peeringISHIDA Wataru
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>
2016-07-29config: curve out code specific to default global config settingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-07-29config: curve out code specific to default neighbor config settingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server/config: fix md5ed ipv6 active connectionISHIDA Wataru
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>
2016-05-17zebra: make zebra config consistent with the restsFUJITA Tomonori
- 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>