3160 Commits

Author SHA1 Message Date
FUJITA Tomonori
51a1130f6c Ryu 4.19
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.19
2017-11-01 21:48:39 +09:00
IWASE Yusuke
e1e85052f5 BGPSpeaker: Enable to specify local listen addresses
Currently, BGPSpeaker will listen the incoming connection with the
unspecified IP addresses ('0.0.0.0' and '::').

This patch enables to specify the local listen address list for starting
BGPSpeaker instance.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-10-15 13:21:23 +09:00
IWASE Yusuke
6329444165 bgp/application: Enhance arguments handling for BGPSpeaker
Currently, when new arguments are introduced into BGPSpeaker,
ryu.application.RyuBGPSpeaker need modifications to support the
introduced arguments.

This patch enables to pass arguments to BGPSpeaker without some
modifications on RyuBGPSpeaker.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-10-15 13:21:21 +09:00
IWASE Yusuke
7ef14a83a2 test_controller: Test cases for _split_addr()
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-10-15 13:04:41 +09:00
IWASE Yusuke
09d5b2533c controller: APIs to register switch address dynamically
This patch introduces APIs to register/unregister switch address after
Ryu (ofp_handler) starting.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-10-15 13:04:39 +09:00
IWASE Yusuke
f775290360 controller: Support proactive connection
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-10-15 13:04:38 +09:00
FUJITA Tomonori
6e69e9b8a6 Ryu 4.18
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.18
2017-10-03 13:38:51 +09:00
IWASE Yusuke
3c22bf4144 zclient/zserver: Support FRRouting messages format
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:37:32 +09:00
IWASE Yusuke
bf9b8ac588 test_zebra: Enhance test cases
Note: The binary representation is not extracted from the real packets
and based on the implemetation, so might be required to be fixup with
the real packets.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:37:31 +09:00
IWASE Yusuke
aedd3920b3 packet/zebra: Support MPLS Labels messages
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-17 13:37:29 +09:00
IWASE Yusuke
e423a1f0bc packet/zebra: Support Interface Router Advertisement messages
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-17 13:37:22 +09:00
IWASE Yusuke
6b48da6729 packet/zebra: Support VRF related messages
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-17 13:37:16 +09:00
IWASE Yusuke
7baed0a100 packet/zebra: Support BFD Destination messages
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-17 13:37:13 +09:00
IWASE Yusuke
7804cbb6f4 packet/zebra: Support Neighbor Connected Address messages
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-17 13:37:07 +09:00
IWASE Yusuke
7091523f8f test_zebra: Add pcap for API version 4 on FRR v2.0
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:37:00 +09:00
IWASE Yusuke
90f0434c18 packet/zebra: Support some FRRouting messages format
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-17 13:36:53 +09:00
IWASE Yusuke
0716d2cba1 packet/zebra: Constants for supporting FRRouting format
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:45 +09:00
IWASE Yusuke
a5f24fe3e3 packet/zebra: Support asymmetric structure of ZEBRA_*_IMPORT_LOOKUP
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-17 13:36:40 +09:00
IWASE Yusuke
b66c597fb6 packet/zebra: Parse messages based on Zebra API version
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:32 +09:00
IWASE Yusuke
c860675a5f packet/zebra: Missing bw_cls_num in InterfaceLinkParams
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-17 13:36:26 +09:00
IWASE Yusuke
8e851711a7 packet/zebra: Constants for Link Parameters Status
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:14 +09:00
IWASE Yusuke
18fa853352 packet/zebra: Constants for Interface Address Flags
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:12 +09:00
IWASE Yusuke
a104e11c0d packet/zebra: Return "ZebraMessage" for message from Zebra
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:10 +09:00
IWASE Yusuke
96891addf5 packet/zebra: Fix unresolved reference for _serialize_nexthops
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-17 13:36:02 +09:00
Thomas Bechtold
0673a8868e Only import pip if needed
In some systems pip is not installed and the parse_requirements() function
is not needed. So only import pip if needed. Otherwise this fails with:

  from ryu.base import app_manager
  File "/usr/lib/python2.7/site-packages/ryu/base/app_manager.py", line 34, in <module>
  from ryu import utils
  File "/usr/lib/python2.7/site-packages/ryu/utils.py", line 23, in <module>
  from pip import req as pip_req
  ImportError: No module named pip

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-09-05 15:54:07 +09:00
FUJITA Tomonori
1782f54f3c Ryu 4.17
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.17
2017-09-04 21:52:10 +09:00
mgrex97
0c0656f95a topology/switches: Fix delete port can't immediately remove link.
If remove port data from self.port_state first,
self.get_port method can't get the port data,
this problem will cause link can't immediately be removed.
This patch remove port data after get_port and link delete.

Signed-off-by: Yu Ren <j6y4u4xup6@gmail.com>
Signed-off-by: mgrex97 <j6y4u4xup6@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-29 22:51:15 +09:00
IWASE Yusuke
80fedbfeaf BGPSpeaker/net_ctrl: Close activity for each session
Currently, a thread for processing outgoing message will be remained in
"RpcSession" activity even if RPC session is closed by the remote peer,
and garbages on memory will grow.

This patch fixes to close "RpcSession" activity when RPC session
closing.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-29 22:50:36 +09:00
Satoshi Fujimoto
98a838e487 packet/bmp: Correctly parse peer address with IPv4
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-29 22:49:53 +09:00
IWASE Yusuke
f85ae78465 rest_qos: Avoid discarding Queues info for each request
Currently, rest_qos discards the Queues info stored on its dictionary
for each "Set queue" request.
So rest_qos always reply only last Queue setting.

This patch fixes to avoid discarding the Queues info and enable to reply
all configured Queues settings.

Note: In order to store all Queues settings, "port name" field for each
Queue will be inserted on the reply of "Get queue configuration" API.
 - Before:
    [
      {
        "command_result": {
          "result": "success",
          "details": {
            "0": {
              "config": {
                "max-rate": "500000"
              }
            },
            "1": {
              "config": {
                "min-rate": "800000"
              }
            }
          }
        },
        "switch_id": "0000000000000001"
      }
    ]
 - After:
    [
      {
        "command_result": {
          "result": "success",
          "details": {
            "s1-eth1": {    # <-- Inserted
              "0": {
                "config": {
                  "max-rate": "500000"
                }
              },
              "1": {
                "config": {
                  "min-rate": "800000"
                }
              }
            }
          }
        },
        "switch_id": "0000000000000001"
      }
    ]

Reported-by: Fahmy Sherif Alaa Salaheldin <sherif.fahmy@epfl.ch>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-29 22:49:36 +09:00
Dingyuan Hu
bc7451dc7c services/ovsdb: Listen on IPv6 Address
This patch enables Ryu to listen ovsdb connections on IPv6 Address.
Note that you need to make a config file like belows:
    [ovsdb]
    address=::

Signed-off-by: Dingyuan Hu <hdyvip@gmail.com>
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-29 22:49:12 +09:00
Satoshi Fujimoto
7f537c4185 packet/icmpv6: Assert length in options are valid
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-04 21:11:49 +09:00
Satoshi Fujimoto
ee9a197dd6 packet/icmpv6: Fix parsing undefined nd_option fails
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-08-04 21:11:09 +09:00
IWASE Yusuke
44cd14ac81 ofp_event: Timestamp when OpenFlow event was generated
This patch introduces "timestamp" attribute for OpenFlow event classes
which shows when that event was generated by Datapath instance and nearly
equivalent to when Ryu finished receiving the message contained in that
event instance.

Suggested-by: Matthew Hayes <matthew_john_hayes@hotmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-08-04 21:07:28 +09:00
FUJITA Tomonori
6d950481f6 Ryu 4.16
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.16
2017-08-02 10:39:13 +09:00
IWASE Yusuke
800c136a9b doc: Fix unexpected indent in ryu/lib/packet/bgp.py
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30 22:07:08 +09:00
IWASE Yusuke
cb40f779d1 doc: Deprecated option html_use_smartypants
"html_use_smartypants" in conf.py is deprecated in Sphinx 1.6.
This patch fixes to use "smart_quotes" in docutils.conf instead.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-30 22:07:06 +09:00
IWAMOTO Toshihiro
ec04ff9f46 ofproto: Avoid emitting illegal instruction sets
The OpenFlow spec forbids multiple occurences of a same instruction
type within a mod_flow message, so make sure
ofp_instruction_from_jsondict doesn't emit such an instruction set.

Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-21 21:54:25 +09:00
Travis Gockel
5e176f9e7c doc: Minor grammar changes in ryu_app_api 2017-07-21 21:47:47 +09:00
IWASE Yusuke
214cd8c305 unit/ofproto: Adopt to rename of OFPErrorExperimenterMsg
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-21 21:38:42 +09:00
IWASE Yusuke
5099034d0c ofproto: Handle OFPErrorExperimenterMsg
Currently, OFPErrorExperimenterMsg is not registered into OpenFlow
message events dict as "EventOFPErrorExperimenterMsg", and could not be
converted to events by ofp_event module.

This patch obsolete OFPErrorExperimenterMsg class and fixes to use
EventOFPErrorMsg to handle the experimenter error messages.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-21 21:38:42 +09:00
IWASE Yusuke
b964275b53 bgp_sample_conf: absolute_import to suppress warnings
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-21 21:38:42 +09:00
Satoshi Fujimoto
60651d8a1c service/ovsdb: get socket from RemoteOvsdb
This patch adds "socket" field to RemoteOvsdb
to get sockets which connects to switches.

e.g.)
    @set_ev_cls(ovsdb_event.EventNewOVSDBConnection)
    def handle_new_ovsdb_connection(self, ev):
        print(ev.client.socket.getsockname()[0])

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-07-02 20:21:14 +09:00
FUJITA Tomonori
cd67c52471 Ryu 4.15
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v4.15
2017-07-02 20:08:32 +09:00
FUJITA Tomonori
a991fed7e4 Revert "tests: Separate test files from Ryu module"
This reverts commit a67ed2858417b9d795460f05126c01fb0cd344f9.

The commit breaks OpenStack neutron dynamic routing.
2017-06-30 14:23:03 +09:00
IWASE Yusuke
a67ed28584 tests: Separate test files from Ryu module
To prevent redundant files (e.g., pcap files, json files for tests,
packet data generator) to be installed, this patch separates test
directory from Ryu module.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-26 15:17:44 +09:00
Satoshi Fujimoto
d8ae9491da service/ovsdb: Use dict.items() instead of six.iteritems()
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-23 12:08:18 +09:00
Satoshi Fujimoto
ea23ebdadf doc/ovsdb_manager: Update Sample Code
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-23 12:08:18 +09:00
Satoshi Fujimoto
10b9273928 service/ovsdb: Use Python 2/3 compatible code
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-23 12:08:18 +09:00
Satoshi Fujimoto
27b8d44bb1 service/ovsdb: Avoid to use dict as default argument
Using mutable values as default arguments will cause unexpected behavior.

Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-06-23 12:08:18 +09:00