summaryrefslogtreecommitdiffhomepage
path: root/server
AgeCommit message (Collapse)Author
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-06zclient: Code inspectionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-09-06zebra/zapi: Define type for Zebra API message flagsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-08-28server: export addROA()/delROA() for library usageEiichiro Watanabe
2017-08-13server: fix fd leak in DialTCP() on LinuxFUJITA Tomonori
A new socket was created so we must close it before this function returns _either_ on failure or success. On success, net.FileConn() in newTCPConn() increases the refcount of the socket so this fi.Close() doesn't destroy the socket; the caller can use it (and needs to close it later). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-02server: add sockopt ttl support to darwinFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-01server: fix zclient to handle route messages without nexthopFUJITA Tomonori
Seems that zebra could send a route message without nexthop (makes sense for withdraw). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30server: fix active connection error checkFUJITA Tomonori
https://github.com/osrg/gobgp/issues/1391 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-26add addpath send supportFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-26server: remove unnecessary Filter() in rsFUJITA Tomonori
RS peers and non RS peers uses different tables so no need to filter paths from rs clients for non rs clients. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-19rpki: Collect detailed information while validatingSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-18server: Set incoming TTL before accepting connectionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-18server: Set outgoing TTL before dialingIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-14server: Skip TCP MD5Sig sockopt when empty auth-passwordIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-07-04support addpath recvISHIDA Wataru
2017-07-04use Destination instead of Path for path selection APIFUJITA Tomonori
With Destination struct, multiple Paths can be moved from the table package to the server package in a cleaner way; for features such as add-path. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-04server: split rib into twoFUJITA Tomonori
currently, route server peers and non route server peers use the single global rib. To support deterministic-med for non route server peers, this splits the rib into two; easier to handle the best path selection in different ways. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-23server: Enable to configure static TTL for BGP packetsIWASE Yusuke
Like "ttl" configuration of Junos OS, this patch enables to set static TTL value for outgoing BGP packets. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-23server: Implement TTL securityIWASE Yusuke
This patch enable to configure Generalized TTL Security Mechanism (GTSM). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-23server/sockopt: Support to set minimum TTLIWASE 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-20peer: Check errors in creating Dynamic PeersSatoshi Fujimoto
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-09bmp: Support number of withdraw updates and prefixesIWASE Yusuke
This patch enables to send BMP statistics reports for the following types; - Stat Type = 11: (32-bit Counter) Number of updates subjected to treat-as-withdraw treatment. - Stat Type = 12: (32-bit Counter) Number of prefixes subjected to treat-as-withdraw treatment. Note: Currently, this implementation considers only updates or prefixes received from neighbors, but not enough to follow the handling process described in RFC7606. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-07replace github.com/Sirupsen/logrus with github.com/sirupsen/logrusFUJITA Tomonori
The usage of "github.com/sirupsen/logrus" is recommended. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-06server_test: Test for Graceful Restart timer expiredIWASE Yusuke
This test case checks whether BGP session is freed or not when Graceful Restart timer expired. If BGP session is not freed as expectedly, this test case will exit with state 1 after waiting 120 seconds and will output the following. FATA[0147] failed to free the fsm.h.t for 127.0.0.1 BGP_FSM_OPENSENT BGP_FSM_IDLE Topic=Peer Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-06server_test: Add a sleep for stabilityIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-06server: Close conn when graceful restart timer expiredWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-06-06server_test: stop listeningIWASE Yusuke
Listening on well-known port require the root privileges. This patch stop listening to avoid that because this test doesn't need to accept a peer. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-06server_test: Confirm BgpServer started and stoppedIWASE Yusuke
For each test case, this patch enables to confirm BgpServer is started successfully and stopped at the of each test case, otherwise the context of some test cases might affect other test cases. Signed-off-by: IWASE Yusuke <iwase.yusuke0@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-03bmp: Enable to send BMP Route Mirroring messagesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-03server: Implement event for BGP message watcherIWASE Yusuke
This patch enables to watch events for monitoring received BGP messages before the state comparison. Note: Currently, this event nortifies UPDATE message only, because the other messages will be handled in FSMHandler and not received at BgpServer, so BgpServer cannot send event for these messages. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-06-01Fix RouteDistinguisher parsing and VPNV6 VRF rib parsingLamanna
2017-06-01packet/mrt: BGP Additional Path Extensions (RFC8050)IWASE Yusuke
This patch enables to decode/encode MRT format with BGP Additional Path Extensions which described in RFC8050. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-23bmp: Implement Information TLV on Termination messagesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-23bmp: Implement Information TLV on Initiation messageIWASE Yusuke
Currently, the TLV fields are implemented as BMPTLV on the Initiation messages, but not enough decoded and required to be constructed in binary format. This patch introduces BMPInfoTLV and makes easy to handle the TLV fields. Note: This patch obsoletes BMPTLV structure. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-22bmp: Stats reports for Adj-RIBs-In and Loc-RIB routesIWASE Yusuke
This patch enable to send BMP statistics reports for the following types; - Stat Type = 7: Number of routes in Adj-RIBs-In = Regarding number of "accepted" routes in AdjTable state - Stat Type = 8: Number of routes in Loc-RIB = Regarding number of "advertised" and "filtered" routes in AdjTable state which means the all routes selected by the local BGP speaker's Decision Process. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-22server/peer: Number of filtered routes to advertiseIWASE Yusuke
This patch extend the "AdjTable" container to store the number of the "filtered" routes which should not be advertised to the given neighbor. This routes mean the filterd routes because of RTC, VRFs, policy and other constraints. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-22bmp: Obsolete "both" option for route-monitoring-policyIWASE Yusuke
Because of the introduction of "local-rib" and "all" options for route-monitoring-policy, this patch obsoletes "both" option. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-22bmp: Fix peer header info in Loc-RIB route messageIWASE Yusuke
"draft-evens-grow-bmp-local-rib" says the peer header for Loc-RIB monitoring should include the following values; - Peer Address: Zero-filled as remote peer address is not applicable. - Peer AS: Set to the BGP instance global or default ASN value. - Peer BGP ID: Set to the BGP instance global or RD (e.g. VRF) specific router-id. This patch fixes the peer header construction to follow this specification. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-22bmp: Enable to specify all route monitoring policiesIWASE Yusuke
This patch adds the new key "all" for specifying the all BMP route monitoring policies. Configuration Example: [[bmp-servers]] [bmp-servers.config] address = "127.0.0.1" port=11019 route-monitoring-policy = "all" Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-05-17server/fsm_test.go: fix race condition during testsChris Stockton
Add sync.Mutex to guard access to MockConnection to prevent tests ran with -race from failing. In addition change the calls to the fmt package to use t.Log show they only show with the -v flag to prevent unwanted noise between test runs. It has the added benefit of providing a file and line number as well.
2017-05-14server: avoid sending unwanted withdrawals to iBGP peersWataru Ishida
when the old best was from iBGP, we don't need to send withdrawals to iBGP peers. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
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-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-05-09api: fix api/server struct conversionWataru Ishida
convert default in/import/export policy type remove remote-private-as, send-community since we are not using them Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-06cli: speed up showing a specific defined-setWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-04-27server: fix handling bgp messages right after moving to idle state from ↵FUJITA Tomonori
established currently gobgpd continues to handle update messages even if becomedidle state from establised. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>