summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2016-10-25ovs/vsctl: Sort out commands orderIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/bridge: Add APIs for missing Database commandsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl remove commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl add commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl list commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl add-bond commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Update command list with OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Avoid applying next() to non-iterator objectIWASE Yusuke
In Python 2, the builtin function next() can not be applied to non-iterator object. This patch fixes to use the list comprehensions and avoid applying next() to a list type object. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing required argument for find_vlan_bridgeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Reduce pylint warningsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Revert ovs module pathIWASE Yusuke
Because contrib.ovs has been removed, we no longer need to update the path for loading ovs module. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Fix VSCtlCommand to inherit StringifyMixinIWASE Yusuke
For convenience when printing command results, this patch fixes VSCtlCommand to inherit StringifyMixin. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vswitch_idl: Update OVSDB schema with v7.14.0IWASE Yusuke
This patch regenerates OVSDB schema with vswitchd/vswitch.ovsschema v7.14.0 included in OVS v2.6.0 release. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Change log level of redundant messagesIWASE Yusuke
Currently, ovs.vsctl outputs the messages (e.g. just "unchanged" or "success") in the "info" log level for each transaction, but these messages are not meaningful for users. This patch changes the log level of these messages to "debug". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25rest_router: Fix conversion of Packet Library to dictIWASE Yusuke
On Python3, rest_router fails to compare the type of protocols in the Packet Library instances, because the non-parsed packet data is not str type but bytes type. This patch fixes to compare the protocols instance type with packet_base.PacketBase and enable to convert the Packet Library instances to dict. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25dpset: Fix iteration error when disconnecting switchesIWASE Yusuke
When disconnecting switches, dpset will fail to unregister ports, because size of values in the port state dictionary might be changed when doing the iteration. This patch fixes to copy the values list and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-12test_parser: Add an truncate packet testIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-12test_parser: Enable tests for truncated packetsIWAMOTO Toshihiro
When there are files named "*.truncated%d" in the packet_data directories, they are treated as special instructions; test method are generated by truncating wire_msg from corresponding "*.packet" files. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-12ofproto_v1_3_parser: Raise OFPTruncatedMessage exception on truncated messagesIWAMOTO Toshihiro
OFPT_ERROR_MSG can return truncated messages. Some users want to see them in human-friendly format [1]. Catch exceptions caused by such truncated messages and reraise as OFPTruncatedMessage with incomplete ofpmsg in the exception class. [1] https://bugs.launchpad.net/dragonflow/+bug/1624826 Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-12ofproto/nicira_ext: Add missing NXMs in OVS v2.6.0Shinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-08ryu/lib/ofctl_v1_3: port name decoding fixMichał Rzepka
The patch resolves issue experienced when decoding certain values of name field in OFPMP_PORT_DESCRIPTION body. Non-decodable bytes are replaced with utf-8 replacement character. This issue was observed while retrieving OFPMP_PORT_DESC reply from OpenFlow 1.3 compliant HP switch. One of ofp_struct structures describing OFPP_LOCAL port has a name field with value 4f 46 50 50 5f 4c 4f 43 41 4c 00 81 ff ff ff ff that translates to OFPP_LOCAL....... Attempt to decode the value, as in modified line, raises an exception "UnicodeDecodeError: 'utf8' codec can't decode byte 0x81 in position 11: invalid start byte". In the submitted patch, non-decodable characters are replaced with utf-8 REPLACEMENT CHARACTER (U+FFFD), which is sufficient for the get_port_desc method to work seamlessly. Similar usages of str.decode method may be found in ofctl_v1_3, ofctl_v1_4, ofctl_v1_5 and need to be fixed in the future. Signed-off-by: Michal Rzepka <mrzepka@student.agh.edu.pl> Reviewed-by: Iwase Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-08BGPSpeaker: Enhance APIs for operator.showIWASE Yusuke
This patch enhances the APIs of BGPSpeaker class which call 'operator.show' APIs. Note: This patch renames the argument 'routetype' of neighbor_get() into 'route_type' for the consistency of APIs. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-04Ryu 4.7FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-04BGPSpeaker: Fix to enable to notify peer downIWASE Yusuke
If BGPSpeaker.neighbor_del() is called, an event to notify peer down via _notify_peer_down() method will be generated. But when _notify_peer_down() method is called, peer.protocol is already cleaned up with None, so _notify_peer_down() method will fail to get the neighbor info (IP address, AS number). This patch fixes to retrieve the neighbor info from the neighbor configuration info of Peer class and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-04use old cryptography versionFUJITA Tomonori
Looks like that the latest version (1.5.2) doesn't work: https://s3.amazonaws.com/archive.travis-ci.org/jobs/164527154/log.txt Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01packet: Avoid parsing an empty bufferIWASE Yusuke
For example, the packet library detects the TCP payload type by using the TCP src/dst port, but in case of the BGP packet, the packet library will try to parse a TCP ACK packet as a BGP packet, and will fail to parse. This patch enables to ignore an empty buffer and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01pip-requires: Add ovs>=2.6.0IWASE Yusuke
Now OVS 2.6.0 has been released, which is including Python 3 compatibility. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01doc: Add API reference for REST EVPN switchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01app: Add sample application for REST EVPN switchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01app: Integrate aplication of Ryu-bookShinpei Muraoka
Henceforth, Ryu-Book includes the source files for application of Ryu. This patch Integrates the source files for application of Ryu-Book. Just for information, the source files for application of Ryu-Book will Integrate as for OpenFlow1.3. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Enable to request tunnel port numberIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Add utility method to create VXLAN portIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Make local_ip to optional field for tunnelIWASE Yusuke
To create GRE tunnel, the local_ip field is not mandatory field. This patch makes the local_ip field to optional for the convenience. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/vsctl: Catch the default tag type in Port TableIWASE Yusuke
According to ovs-vswitchd.conf.db(5), the tag column is an integer in range 0 to 4095, but OVS may returns the empty list [] as the default value. OTOH, Ryu expects an integer type as the default and fails to get the port information in the table. This patch enables to catch the empty list as the default and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01stplib: Fix to store current OFPPort statusShinpei Muraoka
Currently, stplib compares the status of OFPPortStatus message with that of Datapath instance, but this comparison returns always "equal", so stplib fails to get the correct port status. This patch fixes to store the current port status and to compare the new status with the stored status. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01stplib: Fix to compare MAC address and Bridge IDShinpei Muraoka
cmp() func was introduced for Python 3 compatibility before, but this implementation is not enough, because a MAC address can not be compared with a Bridge ID (integer value) by com() func. This patch fixes to convert the MAC address into an integer value before comparing with Bridge ID and fixes this problem. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01BGPSpeaker/api/operator: Simplify registration decoratorIWASE Yusuke
Currently, in Python3, api.operator call APIs, which are used by BGPSpeaker.rib_get() for example, cannot be registered correctly. So call('operator.show', **kwargs) fails to get the registered method by the symbol 'operator.show'. This patch simplifies the registration decorator for api.operator call APIs and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01BGPSpeaker: Fix typosIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-28ofproto/ofproto_v1_5_parser: OFPMultipartReply malformed message offset fixMichał Rzepka
Recently, I discovered major multipart message parser flaw. The issue was observed while testing Aggregate Flow Statistics message in OpenFlow 1.5 and Open vSwitch. Similar (and potentially also vulnerable) code snippets are also present in other message parsers (e.g. OFPHello). I'd like to ask for opinions on proposed solution. If accepted, similar patches should also be applied for other message parsers. Brief description (steps to reproduce the issue): 1. REST API is called to retrieve aggregate flow stats: curl http://localhost:8080/stats/aggregateflow/8796750139643 2. Open vSwitch replies to Aggregate Stats Request with Aggregate Stats Reply: message buffer: 0x06 0x13 0x00 0x28 0x53 0xfe 0xc4 0xaf 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (note that due to incomplete OF 1.5 support in OvS, message is malformed - ofp_stats struct filled with zeros) 3. Message is processed by Ryu parsers: ofproto_parser.msg -> ofproto_v1_5_parser.msg_parser -> ofproto_v1_5_parser.OFPMultipartReply.parser 4. Here, message body contents are parsed (ofproto_v1_5_parser.OFPMultipartReply.parser, lines 1858-1861): while offset < msg_len: b = stats_type_cls.cls_stats_body_cls.parser(msg.buf, offset) body.append(b) offset += b.length if hasattr(b, 'length') else b.len 5. Due to incorrect message format, zero-filled message part is parsed as b=OFPAggregateStats(length=0,stats=OFPStats(oxs_fields={})), resulting in constant offset value, as in each iteration offset += 0. 6. Parser remains trapped in a infinite loop with offset = 16, msg_len = 40. Ryu controller hangs completely. OFPMultipartReply parser was observed to handle malformed messages improperly. The patch introduces offset check to fix processing of malformed messages in ofproto_v1_5_parser.OFPMultipartReply.parser. Signed-off-by: Michal Rzepka <mrzepka@student.agh.edu.pl> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-21tests/switch: fix bug in _diff_packets functionMonthadar Al-Jaberi
This fixes the problem of the payload being always shown when another field differs between ingress and egress test. Signed-off-by: Monthadar Al Jaberi <monthadar.al-jaberi@infinera.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-16Add Nicira extension vlan_tci fieldIWAMOTO Toshihiro
This Nicira extension field is VLAN VID+CFI+PCP. OXM_OF_VLAN_VID and OXM_OF_VLAN_PCP should work fine in theory, but in OvS it seems vlan_tci must be used to access the CFI bit from NX_LEARN actions. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Shutdown BGPSpeaker gracefullyIWASE Yusuke
Currently, when BGPSpeaker instance calls 'core.stop', CORE_MANAGER fails to stop its own activities and outputs traceback, because the dictionaries which maps name to instance are changed during iteration. This patch makes a list copy of items() to avoid this problem and enable to shutdown gracefully. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Enable to get path from EventPrefixIWASE Yusuke
To get more detail information about BGP route by using best_path_change_handler, this patch adds path member into EventPrefix and implements property to get existing attributes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker/vrf: Handle non MPLS labled NLRIIWASE Yusuke
Currently, VRF Table supposes the incoming NLRI has MPLS labels field, but some EVPN NLRI don't have MPLS labels field, and BGPSpeaker fails to import the incoming routes from the neighbours. This patch fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Add EVPN routes from Global to VRF TableIWASE Yusuke
This patch adds the missing support for importing EVPN Table from the Global Table to VRF Table when BGPSpeaker recieved a new EVPN route. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07table_manager: Fix conversion of De Morgan's lawsIWASE Yusuke
This patch fixes incorrect conversion of De Morgan's laws. e.g.) not (A and B) == not A or not B Original: if not (vpn_path.source is None and route_dist == vrf_table.vrf_conf.route_dist): Incorrect: if (vpn_path.source is not None and # !!! Should be "or" route_dist != vrf_table.vrf_conf.route_dist): Correct: if (vpn_path.source is not None or route_dist != vrf_table.vrf_conf.route_dist): Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07test_bgpspeaker: Add UT for advertising VNI for EVPNIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Extend to advertise VNI for EVPN routesIWASE Yusuke
This patch enables to advertise VNI as MPLS lables field in the MAC/IP Advertisement Route of EVPN. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Support to advertise Tunnel EncapsulationIWASE Yusuke
This patch adds support to advertise the BGP Tunnel Encapsulation Attribute for the Ethernet VPN Routes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07packet/bgp: Add BGP Encapsulation Extended CommunityIWASE Yusuke
This patch adds the support for BGP Encapsulation Extended Community [RFC5512]. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>