summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib
AgeCommit message (Collapse)Author
2019-09-25Add support for revised RFC8227 withdraw labelsBenjamin Villain via Ryu-devel
This commit fixes a parsing error when a BGP update contains a "withdraw label" equal to 0x000000 instead of 0x8000000 as stated in RFC 3107. This commits treats both labels as "withdraw label" Signed-off-by: Benjamin Villain <villainb@amazon.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2019-09-25Add support for Adj-RIB-Out (draft-ietf-grow-bmp-adj-rib-out-03)Benjamin Villain via Ryu-devel
Signed-off-by: Benjamin Villain <villainb@amazon.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2019-03-28Choose the highest TLS versionIWAMOTO Toshihiro
Please note that this is a stop-gap measure. Also add a basic SSL server test. Co-authored-by: alex <atoptsoglou@suse.com> Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2018-08-14Fix convertion of ipv4 to string on i386 and archSlawek Kaplonski
On architectures like i386 or arm convertion of IPv4 to string was failing in some cases. It was like that because some integer values were converted to long which is not the case on x86_64. It was like that for example with value "2871386400" which is used in ryu.tests.unit.ofproto.test_parser_v10:TestOFPMatch unit test. Because of that this test was failing when running on architectures where integer range was too small to handle this value. Signed-off-by: Slawek Kaplonski <skaplons@redhat.com> Reviewed-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-08-11mrtlib: Define JSON representation typesIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-08-11mrtlib: Support RFC8050IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-08-11mrtlib: Missing subclass for SUBTYPE_RIB_*_MULTICASTIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-07-21lib/ovs/bridge: Return multiple controllersIWAMOTO Toshihiro
OVSBridge may have more than one controller. Let get_controller() return a list of controllers in such cases. NOTE: this introduces incompatibility if multiple controllers are configured for a bridge. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20Fix pycodestyle W605 warningsIWAMOTO Toshihiro
W605 invalid escape sequence, which was recently added in pycodestyle, would be a syntax error in future python3 versions. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-06-20lldp: fixed SystemCapabilities TLVMarcin Chron
This patch removes 'Subtype' byte from SystemCapabilities TLV. There was an inconsistency in offical IEEE document which was corrected in 802.1AB-2009/Cor 1-2013. Signed-off-by: Marcin Chron <marcin_miko1@o2.pl> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-28ofproto: add Nicira extension ct_clear actionIWAMOTO Toshihiro
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-03-20nicira_ext: Support Network Service Header matchIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10doc: Document for ryu.lib.ovsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-02-10lib/ovs: Fix a typo of "--may-exist" optionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17*: Apply autopep8IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-12-17*: Adopt to pycodestyle's checksIWASE Yusuke
This patch adopts to the following pycodestyle's checks; E275: missing whitespace after keyword E305: expected 2 blank lines after end of function or class Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-16packet/icmp: Avoid TypeError when calculating lengthIWASE Yusuke
Currently, ICMPv4 packet instance without its payload, it will raise TypeError when calculating packet length, because the default value of "data" field (payload data) is None and len() can not be applied against None type object. This patch changes the default value of "data" to the empty binary value and confirms the value type of "data" field before serialization. Also, this patch applies the same improvements to ICMPv6 packet library. Reported-by: William Fisher <william.w.fisher@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-16*: Reject Binary Represented IP AddressesSatoshi Fujimoto
As a default, netaddr.valid_ipv4() uses the "aton" rule for its validation, so valid_ipv4('2') and valid_ipv4('1.2.3') returns True. It may cause unexpected behaviors. This commit replaces netaddr.valid_ipv4() to ryu.lib.ip.valid_ipv4(), which is wrapper of netaddr.valid_ipv4(), and use "pton" rule in the method. So, address representation like '2' or '1.2.3' will be rejected. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-01packet/zebra: Support FRRouting version 3.0IWASE Yusuke
This patch enables to support Zebra messages of FRRouting version 3.0 and introduces a flag to switch FRRouting version. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-11-01lib/ovs/vsctl: Function for validate OVSDB addressIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-10-15controller: Support proactive connectionIWASE Yusuke
This patch enables to initiate OpenFlow connection from controller side by using "--ofp-switch-address-list" and "--ofp-switch-connect-interval" options. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support MPLS Labels messagesIWASE Yusuke
This patch implements the following messages on FRRouting: - FRR_ZEBRA_MPLS_LABELS_ADD - FRR_ZEBRA_MPLS_LABELS_DELETE Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support Interface Router Advertisement messagesIWASE Yusuke
This patch implements the following messages on FRRouting: - FRR_ZEBRA_INTERFACE_ENABLE_RADV - FRR_ZEBRA_INTERFACE_DISABLE_RADV Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support VRF related messagesIWASE Yusuke
This patch implements the following messages on FRRouting: - FRR_ZEBRA_VRF_ADD - FRR_ZEBRA_VRF_DELETE - FRR_ZEBRA_INTERFACE_VRF_UPDATE Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support BFD Destination messagesIWASE Yusuke
This patch implements the following messages on FRRouting: - ZEBRA_INTERFACE_BFD_DEST_UPDATE - ZEBRA_BFD_DEST_REGISTER - ZEBRA_BFD_DEST_DEREGISTER - ZEBRA_BFD_DEST_UPDATE - ZEBRA_BFD_DEST_REPLAY Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support Neighbor Connected Address messagesIWASE Yusuke
This patch implements the following messages on FRRouting: - ZEBRA_INTERFACE_NBR_ADDRESS_ADD - ZEBRA_INTERFACE_NBR_ADDRESS_DELETE Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support some FRRouting messages formatIWASE Yusuke
Note: This patch does not support all messages defined in FRRouting, and some of message are left on TODO. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Constants for supporting FRRouting formatIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Support asymmetric structure of ZEBRA_*_IMPORT_LOOKUPIWASE Yusuke
The ZEBRA_IPV4_IMPORT_LOOKUP/ZEBRA_IPV6_IMPORT_LOOKUP has asymmetric structures at when sent to Zebra daemon and when sent from Zebra daemon. Especially, "prefix_len" field is inserted before "prefix" filed when sent to Zebra daemon. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Parse messages based on Zebra API versionIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Missing bw_cls_num in InterfaceLinkParamsIWASE Yusuke
This patch fixes to parse the missing field of the number of unreserved bandwidth classes in Interface Link Parameters structure. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Constants for Link Parameters StatusIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Constants for Interface Address FlagsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Return "ZebraMessage" for message from ZebraIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17packet/zebra: Fix unresolved reference for _serialize_nexthopsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-29packet/bmp: Correctly parse peer address with IPv4Satoshi Fujimoto
Currently, Ryu expects that the IPv4 peer address format is "4 bytes with IPv4 address, followed by 12 bytes padding". However RFC 7854 says the format is "12 bytes padding, followed by 4 bytes with IPv4 address". This patch fixes it to correctly parse/serialize peer address. Reported-by: Henk Smit <hhwsmit@xs4all.nl> Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-04packet/icmpv6: Assert length in options are validSatoshi Fujimoto
About the 'length' field in ICMPv6 options, RFC4861 says that "The value 0 is invalid". This patch adds assertions to raise a exception for such invalid ICMPv6 packets. Reported-by: William Fisher <william.w.fisher@gmail.com> Reported-by: Shivaram Mysore <shivaram.mysore@gmail.com> Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-04packet/icmpv6: Fix parsing undefined nd_option failsSatoshi Fujimoto
The length of nd_option is units of 8 octets. Currently, for nd_options which is undefined in the ICMPv6 packet library, the parser assumes that the length is [8 * length - 2]. It causes fails while parsing these options. This patch fixes it to parse such options correctly. Reported-by: William Fisher <william.w.fisher@gmail.com> Reported-by: Shivaram Mysore <shivaram.mysore@gmail.com> Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30doc: Fix unexpected indent in ryu/lib/packet/bgp.pyIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-30fix dhcp6.py bug using python3胡鼎原
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-30ofctl: Add ovs-ofctl style action string parserIWAMOTO Toshihiro
This commit adds a new method called ofp_instruction_from_str, which takes an ovs-ofctl style action string and returns a list of JSON dictionaries. Currently only a few action strings are understood. Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-12packet/bgp: Support L2VPN Flow SpecSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-12packet/bgp: Properly calculate length for FlowSpecSatoshi Fujimoto
RFC 5575 says the 'len' field in numeric or bitmask operators represents that the length of the value field is [1 << 'len']. But, in serializing FlowSpec messages, the packet library uses the `len` field as the length of the value field itself. This patch fixes it to serialize FlowSpec messages properly. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-12packet/bgp: Support IPv6 Flow SpecSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-11ofproto: Allow CIDR notation for ipv[46]_{src, dst}IWAMOTO Toshihiro
This hack allows CIDR notations for OFPMatch. For example: ofpp.OFPMatch(ipv4_src="198.51.100.0/24") Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09lib/packet: Use literal block for diagram in pydocShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09packet/bgp: Omit description of default valueIWASE Yusuke
Omit description of default value The default value is described in the aut generated API doc of class. So the default value should not be hardcoded in pydoc. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09packet/lldp: Add description for each classIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09packet/arp: Update description for argumentsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-09packet/zebra: Support IP_ROUTE message from ZebraIWASE Yusuke
Zebra IPv4/IPv6 route message have asymmetric structure, in other words, the message structure from Zebra to the protocol daemons and that from the protocol daemons to Zebra have the different structures. This patch introduces _ZebraMessageFromZebra in order to distinguish which daemon sent the message and fixes _ZebraIPRoute to decode IPv4/IPv6 route message from Zebra. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>