summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2016-09-07doc: specify OFP v1.0 for sample applicationMonthadar Al-Jaberi
This is a minimal change to keep the supplied sample code working with latest software. The sample code is not compatible with OFP v1.3+, and if there is no requirement on supported version Ryu will probably accept latest supported OF switch. Signed-off-by: Monthadar Al Jaberi <monthadar.al-jaberi@infinera.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07add modify role API in ofctl_resttungyueh
add description about role API Signed-off-by: tungyueh <tylin.cs03g@nctu.edu.tw> Reviewed-by: Iwase Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07lib/ofctl_v1_4: correct argument order for OFPFlowMod constructorMichał Rzepka
Invalid OFPFlowMod flag and importance values were observed when using app/ofctl_rest. This patch restores the proper order of arguments passed to OFPFlowMod constructor in mod_flow_entry (ofctl_v1_4.py). Signed-off-by: Michal Rzepka <mrzepka@student.agh.edu.pl> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-01Ryu 4.6FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25Validate OpenFlow message length in header, to prevent controller receive ↵Victor Orlikowski
loop DoS When the controller receive loop currently accepts an OpenFlow message, it does not validate the message length. As a result, a malicious or malfunctioning switch could cause send a message that would result in the receive loop making no forward progress. This patch ensures that the message length passed in the OpenFlow message is validated against the specified minimum, and forced to that value if it is smaller. Thanks to Samuel Jero (at Purdue's Dependable and Secure Distributed Systems Lab) for discovering this issue. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25PyInstaller: Enable to build stand-alone executablesIwase Yusuke
Usage: After installing Ryu (on virtualenv is better), build a ryu-manager executable as following: $ pip install PyInstaller==3.1.1 $ cd tools/ $ pyinstaller ryu-manager.spec $ ./dist/ryu-manager Note: PyInstaller==3.2 may have a bug of str encoding, please use Pyinstaller==3.1.1 instead. https://github.com/pyinstaller/pyinstaller/issues/1976 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25handler: Fix for frozen buildsIwase Yusuke
Navigates back the stack to locate the module instead of relying on inspect to locate the module based on the file name. This patch is suggested by papostolescu as Pull Request(*1) on GitHub. (*1) https://github.com/osrg/ryu/pull/26 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Suppress RD in EVPN VRF on SSH consoleIWASE Yusuke
Because the NLRI_CLASS of the VRF EVPN Table is the same as the NLRI_CLASS of the Global EVPN Table, the str representation can not be distinguished with 'formatted_nlri_str' format. So, 'show vrf' commands on the SSH console returns the str outputs with Route Distinguisher (RD) even if the route on the VRF Table can be identified without RD value. This patch implements the str representation properties to output BGP routes on SSH console. Current: RD '65001:100' is duplicated bgpd> show vrf all VPN: ('65001:100', 'evpn') *> 65001:100:multicast_etag(ethernet_tag_id:300,ip_addr:10.10.1.0) None 0.0.0.0 Only Path ? With this patch: bgpd> show vrf all VPN: ('65001:100', 'evpn') *> multicast_etag(ethernet_tag_id:300,ip_addr:10.10.1.0) None 0.0.0.0 Only Path ? Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25doc: Update the API Reference for BGPSpeakerIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25test_validation: Add unit tests for validation utilitiesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Enable validation for optional argumentsIWASE Yusuke
Currently, RegisterWithArgChecks validates only required arguments, so invalid arguments might be passed through if the arguments are registered as optionals. This patch fixes to enable validation for optional arguments. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Raise exception when validation failsIWASE Yusuke
In the validator for the API arguments should raise exception when the validator detects invalid arguments, otherwise the decorator for registering API functions, RegisterWithArgChecks, can pass through the invalid arguments. 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-08-25BGPSpeaker: Improve validation utility methodsIWASE Yusuke
This patch fixes to reduce Pylint warnings, to use 'netaddr' utilities and to reduce redundant if statements. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Resolve unused argumet 'multi_exit_disc'IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: 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-08-25test_table_manager: Add UTs for the Global Table APIIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25table_manager: Rename internal API for consistencyIWASE Yusuke
This patch remames the internal (not for users) API for the consistency, and add missing docstring. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25test_table_manager: Add UTs for the VRF Table APIIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Support VRF Table for Ethernet VPNIWASE Yusuke
This patch enables BGPSpeaker to store EVPN routes into the VRF tables and to provide the API for advertising routes. Usage example: speaker = BGPSpeaker(as_number=65001, router_id='172.17.0.1') speaker.neighbor_add(address='172.17.0.2', remote_as=65002, enable_evpn=True) speaker.vrf_add(route_dist='65001:100', import_rts=['65001:100'], export_rts=['65001:100'], route_family=RF_L2_EVPN) speaker.evpn_prefix_add(route_type=EVPN_MAC_IP_ADV_ROUTE, route_dist='65001:100', esi=0, ethernet_tag_id=200, mac_addr='aa:bb:cc:dd:ee:ff', ip_addr='10.0.0.1', next_hop='172.19.0.1') Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25test_bgpspeaker: Add unit test for the API of EVPNIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Support Ethernet VPN update messagesIWASE Yusuke
This patch enables BGPSpeaker to advertise BGP EVPN routes and store the advertised BGP EVPN routes from the neighbors. TODO: - To support the VRF table for BGP EVPN routes. This patch supports the global table only. - To implement Multihoming Functions. Currently, ONLY Single-Homing is supported. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Fix to serialize BGPNotification on Python3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker/info_base: Add comparison methods for Python3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Support Python3 on SSH consoleIWASE Yusuke
Currently, SSH console of BGPSpeaker fails to recieve commands from user when it is running on Python3 due to the binary conversion. This patch fixes this problem and enables to use SSH console on Python3. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25test_bgp: Add unit tests for Ethernet VPNIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Support MPLS-Based Ethernet VPN (RFC7432)IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Enable to parse the entire packet dataIWASE Yusuke
This patch fixes the TCP packet parser to return the BGP packet parser class if the TCP src or dst port is the reserved BGP port and enable to parse the entire packet data. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25tests: Add tests for specifying Packet library for OFPPacketOut.dataShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25lib/packet: Support the Json format dataShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25ofproto: Enable to specify packet library for OFPPacketOut.dataShinpei Muraoka
So far if you set the packet library to OFPPacketOut.data, error occurred. This patch will be able to set the packet library in OFPPacketOut.data. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-19lib: 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-08-19stringify: Fix to utilise six.moves.builtinsIWASE Yusuke
To improve Pylint results, this patch fixes to utilise six.moves.builtins instead of using __builtin__ on Python2 or builtins on Python3. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-19ofctl_nicira_ext: Fix not enough arguments for format stringIWASE Yusuke
Currently, the assignment for 'table_id' is missing in the arguments of str representation. 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-08-19ofctl_nicira_ext: Resolve not initialized valuesIWASE Yusuke
Currently, 'dst_start_end' and 'src_start_end' in NXActionLearn are not initialized before assignment to convert into string representation. 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-08-02Ryu 4.5FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-02Ensure that send() and send_msg() in controller return status to calling ↵Victor Orlikowski
applications When a Datapath disconnects, an application may not know about it until it attempts to send a message to that Datapath. Ryu's core will detect the failure to send, and will close the Datapath object - but has no way of letting the application know that it did so. With this patch, send_msg() returns True or False, depending on whether the message that the application was trying to send was able to be enqueued to send via a given Datapath object. If the Datapath.send_msg() returns False, the calling application can thereby determine that the Datapath is no longer valid, and should clean up any references it has to it. Existing applications may choose to ignore the return value, and nothing breaks. I have patched one utility method that uses send_msg(), since it was not marked as deprecated. All utility methods marked as deprecated, I have not altered. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-02Clean up stale Datapath objects in the ofctl_service applicationVictor Orlikowski
A quick patch to clean up stale Datapath objects in the ofctl_service application. Signed-off-by: Victor J. Orlikowski <vjo@duke.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-29packet lib: Add packet library of GREShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-27ofproto/nx_actions: Update argument of NXActionCTShinpei Muraoka
Since zone_src in NXActionCT was not possible to specify string, update zone_src of NXActionCT for the uniformity. Therefore, you will be able to specify string of OXM/NXM fields for zone_src. If you want to set the immediate value for zone, zone_src set the None or empty character string. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>