summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2017-11-23table: add attribute hash value to Path structureFUJITA Tomonori
This is for batching paths into one bgp message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-23table: avoid unnecessary attributes in Path objectFUJITA Tomonori
- withdraw path doesn't need any attributes. - mp reach path doesn't need mp unreach attribute (some bgp speackers send an update message including both mp reach and mp unreach). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-22server: Allow 0 value to roaManager.AS for library usageEiichiro Watanabe
2017-11-22server: adminDown operation wrongly resets State.PeerAsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-21cli: ESI Label advertisement on EVPN Ethernet Auto-discovery RouteIWASE Yusuke
This patch enables to advertise ESI Label Extended Community with EVPN Ethernet Auto-discovery Route from "gobgp" command. Example: $ gobgp global rib -a evpn add a-d esi 0 etag 10 label 10 rd 65000:100 esi-label 1 single-active $ 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 hh:mm:ss [{Origin: ?} {Extcomms: [esi-label: 1, single-active]}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21server: Auto derived ES-Import RT for EVPN Ethernet Segment routeIWASE Yusuke
According to RFC7432, the ES-Import RT can be derived automatically when using the ESI Types 1, 2 and 3. This patch enables to derive automatically the ES-Import RT for the given path from BgpServer's API. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21cli: Router's MAC advertisement on EVPN Prefix RouteIWASE Yusuke
This patch enables to advertise Router's MAC Extended Community with EVPN Prefix Route from "gobgp" command. Example: $ gobgp global rib -a evpn add prefix 10.0.0.0/24 etag 10 rd 65000:100 router-mac aa:bb:cc:dd:ee:ff $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:Prefix][rd:65000:100][etag:10][prefix:10.0.0.0/24] [0] 0.0.0.0 hh:mm:ss [{Origin: ?} {Extcomms: [router's mac: aa:bb:cc:dd:ee:ff]} [ESI: single-homed]] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Support EVPN Router's MAC Extended CommunityIWASE Yusuke
This patch supports EVPN Router's MAC Extended Community which described on "draft-ietf-bess-evpn-inter-subnet-forwarding". According to "draft-ietf-bess-evpn-prefix-advertisement" This extended community might be carried with EVPN IP Prefix Route NLRI. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Zeros if GW in EVPN Prefix route omittedIWASE Yusuke
According to "draft-ietf-bess-evpn-prefix-advertisement-08", the GW IP field SHOULD be zero if it is not used, but currently, GoBGP skips encoding the GW IP field (not composed). This patch fixes to fill zeros to solve this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Check range of EVPN related Label fieldIWASE Yusuke
This patch enables to check the value range of Label included in EVPN routes or PMSI Tunnel attribute when decoding and serialising it. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21cli: Support ESI in EVPN macadv and prefix routesIWASE Yusuke
This patch enables to specify ESI value when adding EVPN "macadv" and "prefix" routes. Example: "macadv" route $ gobgp global rib -a evpn add macadv aa:bb:cc:dd:ee:ff 10.0.0.1 esi 0 etag 10 label 20,30 rd 65000:100 $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [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 hh:mm:ss [{Origin: ?} [ESI: single-homed]] Example: "prefix" route $ gobgp global rib -a evpn add prefix 10.0.0.0/24 esi LACP aa:bb:cc:dd:ee:ff 100 etag 10 rd 65000:100 $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:Prefix][rd:65000:100][etag:10][prefix:10.0.0.0/24] [0] 0.0.0.0 00:00:14 [{Origin: ?} [ESI: ESI_LACP | system mac aa:bb:cc:dd:ee:ff, port key 100] [GW: 0.0.0.0]] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21cli: EVPN Ethernet Segment Route advertisementIWASE Yusuke
This patch enables to add route for EVPN Ethernet Segment Route via "gobgp" command. Example: $ gobgp global rib -a evpn add esi 10.0.0.1 esi 0 rd 65000:100 $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:esi][rd:65000:100][esi:single-homed][ip:10.0.0.1] 0.0.0.0 hh:mm:ss [{Origin: ?}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Use ESI str in EVPN Ethernet Segment RouteIWASE Yusuke
This patch fixes to use the string representation of ESI in the string representation of EVPN Ethernet Segment Route. Currently, displayed in the default representation of ESI structure. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Avoid raw binary in EVPN ESI stringIWASE Yusuke
Currently, the value field of EVPN ESI might be corrupted when ESI type is ARBITRARY (not "single-homed") or unknown type because the value field will be formatted as the raw byte slice in this case. This patch fixes to convert the byte slice into the colon separated hex values which is corresponding to the format of the CLI input. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21packet/bgp: Use decimal AS number in EVPN ESIIWASE Yusuke
Currently, the representation of AS number in EVPN ESI Type AS (Type 5) uses the colon separated 2 octet values format, but in other places, the AS4_PATH attribute for example, the single decimal format is used. This patch fixes to use the decimal AS number for the consistency with the AS_PATH/AS4_PATH attributes and also the CLI input format. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-21cli: EVPN Ethernet Auto-discovery Route advertisementIWASE Yusuke
This patch enables to add route for EVPN Ethernet Auto-discovery Route via "gobgp" command. Example: $ gobgp global rib -a evpn add a-d esi 0 etag 10 label 20 rd 65000:100 $ gobgp global rib -a evpn Network Labels Next Hop AS_PATH Age Attrs *> [type:A-D][rd:65000:100][esi:single-homed][etag:10] [20] 0.0.0.0 hh:mm:ss [{Origin: ?}] Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>