summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-01-09test/lib/{gobgp,quagga}: IPv6 forwarding in zebra.confIWASE Yusuke
With this patch, it is not required to enable IPv6 forwarding by using "sysctl" explicitly in Quagga or GoBGP(Zebra enabled) containers. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09test/lib/base: Removes redundant routes from hostIWASE Yusuke
When creating a new Docker network (Linux Bridge), some routes to its subnet will be installed in to the container host's routing table. This routes enable containers to communicate each other through the container host's rouging table, then causes the unexpected success of scenario tests (e.g., ping between containers). This patch removes the unexpected routes from the container host and avoid this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-09zebra/zapi: Fix Zebra API type when IPv6 routesIWASE Yusuke
When implementing the FRRouting message format, missed to detect the Zebra API type for adding/deleting IPv6 routes, and all API type will be encoded with the types for IPv4 routes unexpectedly. This patch fixes the encoded API type by determine the given prefix is IPv4 or IPv6. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-06travis: remove useless "go" sectionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-05travis: Run "dep ensure" before "go fmt" and "go vet"IWASE Yusuke
Because "satori/go.uuid" changed some syntax of its API, "go fmt" and "go vet" commands will fail with the latest codes. This patch fixes to run dep ensure before running these tests and solves this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-01-02GoBGP 1.27FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-30cli: Slash separated offset arg for FlowSpec PrefixIWASE Yusuke
Currently, "gobgp" command supports only; "<ipv6 prefix>/<len> <offset>" # space separated format to specify the prefix offset for the FlowSpec destination/source rules, but the displayed format with "rib" command is; "<ipv6 prefix>/<len>/<offset>" # slash separated and the slash separated format is not allowed as command arguments. This patch enables to specify the slash separated format for the FlowSpec destination/source rules arguments and resolve unmatch of the input/output formats. Example: $ gobgp global rib -a ipv6-flowspec add match destination 0:db8:1::1/64/16 then accept $ gobgp global rib -a ipv6-flowspec Network Next Hop AS_PATH Age Attrs *> [destination: 0:db8:1::/64/16] fictitious 00:00:00 [{Origin: ?} Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-30evpn.md: Add description and examples for ESIIWASE Yusuke
Also this patch updates table of contents. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-30cli: Support EVPN Default Gateway Extended CommunityIWASE Yusuke
This patch enables to support the Default Gateway Extended Community on the EVPN MAC/IP Advertisement route. Usage Example: $ gobgp global rib -a evpn add macadv aa:bb:cc:dd:ee:ff 10.0.0.1 etag 10 label 20,30 rd 1.1.1.1:65000 default-gateway $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:macadv][rd:1.1.1.1:65000][etag:10][mac:aa:bb:cc:dd:ee:ff][ip:10.0.0.1] [20,30] 0.0.0.0 00:00:00 [{Origin: ?} {Extcomms: [default-gateway]} [ESI: single-homed]] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-28addpath_test: Wait for re-establishment with ExaBGPIWASE Yusuke
When adding or deleting routes in ExaBGPContainer, it is required to restart ExaBGPContainer with the current implementation. This patch fixes to wait for the re-establishment with ExaBGP and improves the stability of this test case. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-21zebra: fix 'directly-connected' type configuration from grpc apiFUJITA Tomonori
Works but sorta hacky. We should revise after the GRPC API udpate. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-21doc: CLI Syntax for EVPN routesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-21cli: Enable to filter EVPN routes by Route TypeIWASE Yusuke
Currently, "gobgp" command supports only to display all routes on RIBs, but with huge RIBs, it is convenient to select routes by a part of NLRI fields. This patch enables to filter routes by EVPN Route Type. For example, when 5 routes for each route type; $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:A-D][rd:65000:100][esi:single-homed][etag:10] [10] 0.0.0.0 00:01:09 [{Origin: ?}] *> [type:Prefix][rd:65000:100][etag:10][prefix:10.0.0.0/24] [0] 0.0.0.0 00:00:04 [{Origin: ?} [ESI: single-homed] [GW: 0.0.0.0]] *> [type:esi][rd:65000:100][esi:single-homed][ip:10.0.0.1] 0.0.0.0 00:00:19 [{Origin: ?}] *> [type:macadv][rd:65000:100][etag:10][mac:aa:bb:cc:dd:ee:ff][ip:10.0.0.1] [20,30] 0.0.0.0 00:00:54 [{Origin: ?} [ESI: single-homed]] *> [type:multicast][rd:65000:100][etag:10][ip:10.0.0.1] 0.0.0.0 00:00:33 [{Origin: ?}] You can select multicast route as following; $ gobgp global rib -a evpn multicast Network Labels Next Hop AS_PATH Age Attrs *> [type:multicast][rd:65000:100][etag:10][ip:10.0.0.1] 0.0.0.0 00:03:02 [{Origin: ?}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-20table: fix converting 2bytes to 4bytes AS PATHFUJITA Tomonori
On some conditions, we add some ASes to As4PathParam.AS but don't update As4PathParam.Num (the number of ASes). It breaks serialization of AS4PathParam. Instead of modifying the internal of As4PathParam, let's create a new As4PathParam object. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17packet/bgp: use strconv.FormatInt() instead of strconv.Itoa() in testsVincent Bernat
Itoa() takes an int which will only be 32-bit on i386 and similar architectures. In tests, some constants are too big. Therefore, switch all uses of strconv.Itoa() to strconv.FormatInt(). Without this change, we get: ``` src/github.com/osrg/gobgp/packet/bgp/bgp_test.go:1123:41: constant 2864434397 overflows int ```
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-12-16config/util: Refactor to make arguments to receiversSatoshi Fujimoto
For code readability, this commit make some arguments to receivers. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16travis: use old Trusty imagesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-16docs: Update docs for prefix representations in Neighbor SetSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16table/policy: Support prefix representation in NeighborSetSatoshi Fujimoto
Currently, "neighbor-set" supports only IP address representation and IP prefix representation(such as "192.168.0.0/24") is not supported. This commit enables to accept the prefix representation for "neighbor-set" to allow neighbors to be specified as range. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-12-16docs: cli-command-syntax.md: Missing arg to show VRF RIBIWASE Yusuke
This patch fixes the example on the doc for showing the VRF RIB where the "rib" keyword is missing to execute the command. Also, the "-a <adddress family>" is an option and this patch puts it into brackets. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-16docs: update evpn.md for with yabgp 0.4.0sanjmonkey
Notable change: extended community formatting. # YaBGP BGP EVPN extended communities: mac-mobility esi-label es-import router-mac
2017-12-16use label for containers and networks in order to avoid colliding with othersImcom Jin
2017-12-16strict on nosetest reports regexImcom Jin
2017-12-11docs: Equal Cost Multipath Routing with ZebraIWASE Yusuke
This patch adds a new document explains Equal Cost Multipath routes with Zebra integration. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-07bmp: set A flag in Per-Peer HeaderFUJITA Tomonori
Needs to set set A flag in Per-Peer Header if the peer use the legacy 2-byte AS_PATH format. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-07.gitignore: IDE files and reports generated by testsImcom Jin
2017-12-07test: use the current PYTHONPATH in run_all_tests.shFUJITA Tomonori
On some environments, it's necessary to use the current PYTHONPATH to run python. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-06packet/bgp: JSON encode of MP_UNREACH_NLRI attributeVincent Bernat
MP_REACH_NLRI was already correctly encoded in JSON, while this was not the case for MP_UNREACH_NLRI. Before: ```json "PathAttributes": [ { "type": 15, "value": "AAIBQCABDbgAEwAA" } ] ``` After: ```json "PathAttributes": [ { "type": 15, "afi": 2, "value": [ { "prefix": "2001:db8:8::/64" } ], "safi": 1 } ] ``` This commit also adds two tests not directly related to JSON encoding as I was first thinking the problem may be related to incorrect parsing of the path attribute.
2017-12-05travis: Cross-compile test on i386 archIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-05travis: Use "before_script" for "go env" settingsIWASE Yusuke
When testing cross-compile on Travis-CI, the "GOOS" env is overwritten later unexpectedly. This patch fixes to use "before_script" to enable "go env" settings. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-05gobgp: fix the adding of unnumbered BGP neighborFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-05flowspec.md: Update for the details of CLI syntaxIWASE Yusuke
This patch updates the documents for the FlowSpec along with the improvements of the CLI command implementation. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-05cli: Update FlowSpec usage messagesIWASE Yusuke
This patch updates the usage messages for the FlowSpec families along with the improvements of the CLI command implementation. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-02GoBGP 1.26FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-28packet/bgp: Use fixed len types in FlowSpec componentsIWASE Yusuke
Currently, the "FlowSpecComponentItem" uses int type for the "Op" and "Value" fields, but Golang int type has 4 bytes length on the 32-bit env and 8 bytes length on the 64-bit env. For example, to support the SNAP (Type 20) rule, which has 5 bytes value field, int type has not enough length on 32-bit env. This patch fixes to use the fixed length integer types for the FlowSpec components and avoid overflows of value range. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-27test/lib: Allow unconfigured peer-as for Unnumbered BGPSatoshi Fujimoto
For Unnumbered BGP, neighbor AS number isn't needed to be specified, so 'peer-as' should not be specified in the scenario test for Unnumbered BGP. However, currently 'peer-as' is always specified in test/lib/gobgp.py This commit solves this by not specifying `peer-as` if 'neighbor-interface' is configured. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-26cmd: fix getNeighbor() to take bogus neighbor nameFUJITA Tomonori
This fixes the ae7e572550df919c1b9990da8787fc1e860bc20d commit regression. gobgp neighbor command takes a bogus neighbor name like the following: fujita@ubuntu:~/go/src/github.com/osrg/gobgp/gobgp$ ./gobgp n 1 BGP neighbor is 172.17.0.2, remote AS 65001 BGP version 4, remote router ID unknown BGP state = active, up for 17496d 14:21:50 BGP OutQ = 0, Flops = 0 Hold time is 0, keepalive interval is 0 seconds Configured hold time is 60, keepalive interval is 20 seconds Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-26cmd/neighbor: Refactor ShowRoute()Satoshi Fujimoto
For readability and maintainability, separate ShowRoute() into some small functions. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-26cmd/neighbor: Avoid shifted RIB displaySatoshi Fujimoto
Currently, display of RIB may be shifted from route to route because placement is calculated for each destination. This commit avoides the shifted display by calculating the placement with whole of the destinations. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-26cmd/neighbor: Separate Show RPKI info logic from Show RIB logicSatoshi Fujimoto
For readability and maintainability, this commit separates these non-directly related logics. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-24packet/bgp: Use regexp to parse FlowSpec rulesIWASE Yusuke
Currently, the parser for the string representation of FlowSpec rules splits the given string into characters and validates them character by character. So we need to handle the unexpected white spaces carefully. This patch introduces the regular expressions to parse the FlowSpec rules and simplify the parsers. Also improves robustness for the unexpectedly inserted white spaces like "& == tcp". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Refactor construction of FlowSpec rules stringIWASE Yusuke
This patch introduces String() functions for the flags and reserved values related to the FlowSpec rules. Also removes the unused types and functions. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Invert FlowSpec bitmask operand positionIWASE Yusuke
Currently, if the both NOT and MATCH bit are set for the FlowSpec bitmask operand, the string representation will be "=!". For the readability and the consistency with the representation of numeric operator, it should be "!=". This patch inverts "=!" into "!=" for the bitmask operand. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24cli: Return error when no RD for VPN FlowSpecIWASE Yusuke
Currently, if Route Distinguisher is not specified for the VPN FlowSpec types via "gobgp" command, the message as following will be displayed: $ gobgp global rib -a l2vpn-flowspec add match vid 100 then accept rpc error: code = Unknown desc = attribute type length is short But this message does not describe which argument should be specified. This patch fixes to output the message about lack of "rd <rd>". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24cli: Improve arguments extraction for FlowSpec rulesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Sort FlowSpec rules when decoding/creatingIWASE Yusuke
Currently, we sort the FlowSpec rules when creating a new path containing the FlowSpec NLRI and when parsing CLI arguments for the FlowSpec rules. This patch moves sorting the rules into the inside of the "packet" module and sorts them when decoding binary and creating new NLRI. Signed-off-by: IWASE Yusuke <iwase.yusuke0@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-23table: fix merging of v4 paths with addpath enabledFUJITA Tomonori
V4 NLRI needs more 4 bytes with addpath enabled. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-23table: use Path's hash value for mergingFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>