Age | Commit message (Collapse) | Author |
|
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Note: Though tests may not be enough, as far as running unit test,
this patch makes compatible with PyPy interpreter.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
According to RFC 4884 (which supersedes RFC 792), the Destination
Unreachable and Time Exceeded ICMP message get a new “length” field.
This length field, for ICMPv4, is interpreted in 32 bit units.
In the constructor, we cannot validate that the length specified
matches the length of the data passed; the length may need to be
larger (in 32 bit units) in order to accommodate the data that is
actually being sent. We *should*, however, ensure that the data_len
parameter passed fits into a single byte.
It may make sense to document the fact that the length is specified 32
bit units, for when users of the icmp class get a ValueError back
from these constructors.
Signed-off-by: Victor J. Orlikowski <vjo@duke.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
A couple of minor typo fixes.
Signed-off-by: Victor J. Orlikowski <vjo@duke.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
While attempting to peer with a vendor switch, parsing its
BGPOptParamCapabilityGracefulRestart excepted due to the length of the
identifier tuples not being a multiple of 4 octets.
It appears that this might be common as other implementations also stop
when the buffer is < 4.
Signed-off-by: Jason Kölker <jason@koelker.net>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch enables ofctl_v1_*.py to use the reserved OpenFlow
numbers (e.g. port numbering such as "OFPP_CONTROLLER") in the
request and reply parameters of ofctl_rest.py.
Example:
- When adding a flow entry:
$ curl -X POST -d '{
"dpid": 1,
"actions":[
{
"type": "OUTPUT",
"port": "CONTROLLER"
}
]
}' http://localhost:8080/stats/flowentry/add
- When getting flows stats:
$ curl -X GET http://localhost:8080/stats/flow/1
{
"1": [
{
...
"actions": [
"OUTPUT:CONTROLLER"
],
...
}
]
}
Suggested-by: Sergio Andres Rivera Polanco <sergiorivera88@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
modify the default argument from list to None,
because default value {}/[] as argument is dangerous.
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
* modify from "flow" to "meter" the argument of meter_mod
* modify the default argument from {} to None of the following methods
because default value []/{} as argument is dangerous.
- get_flow_stats
- get_aggregate_flow_stats
- mod_meter_entry
* fix some log messages for better readability
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Suggested-by: Ramana Reddy <gtvrreddy@gmail.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
attributes
we must forward optional transitive path attributes.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
These are a Nicira extension for conntrack.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
When omit the parameter of "flags" in mod_meter_entry(), following error log will be shown.
example)
1.use mod_meter_entry() with omitting the parameter of "flags".
curl -X POST -d '{
"dpid": 1,
"meter_id": 1
}' http://localhost:8080/stats/meterentry/delete
2.following error log will be shown.
Unknown flags: 0
This patch fixes the problem.
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
According to RFC 7313 [Enhanced Route Refresh Capability for BGP-4], Ryu bgps needs to send "Start-of-RIB" before it advertises the Adj-RIB-Out. And then, Ryu bgps needs to send "End-of-RIB" after it advertises the Adj-RIB-Out.
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
this patch makes ofctl_rest enable use of OFPQueueGetConfig message.
Get queues config:
usage)
URI: /stats/queueconfig/<dpid>/<port>
method: GET
e.g.)
$ curl -X GET http://localhost:8080/stats/queueconfig/1/1
{
"1": [
{
"port": 1,
"queues": [
{
"properties": [
{
"property": "MIN_RATE",
"rate": 80
}
],
"port": 0,
"queue_id": 1
},
{
"properties": [
{
"property": "MAX_RATE",
"rate": 120
}
],
"port": 2,
"queue_id": 2
},
{
"properties": [
{
"property": "EXPERIMENTER",
"data": [],
"experimenter": 999
}
],
"port": 3,
"queue_id": 3
}
]
}
]
}
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
this patch makes ofctl_rest enable use of OFPTableFeaturesStats message.
Get table features:
usage)
URI: /stats/tablefeatures/<dpid>
method: GET
e.g.)
$ curl -X GET http://localhost:8080/stats/tablefeatures/1
{
"1": [
{
"metadata_write": 18446744073709552000,
"config": 0,
"table_id": 0,
"metadata_match": 18446744073709552000,
"max_entries": 4096,
"properties": [
{
"type": "INSTRUCTIONS",
"instruction_ids": [
{
"len": 4,
"type": 1
},
....
]
},
...
],
"name": "table_0"
},
{
"metadata_write": 18446744073709552000,
"config": 0,
"table_id": 1,
"metadata_match": 18446744073709552000,
"max_entries": 4096,
"properties": [
{
"type": "INSTRUCTIONS",
"instruction_ids": [
{
"len": 4,
"type": 1
},
....
]
},
...
],
"name": "table_1"
},
...
]
}
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
this patch makes ofctl_rest enable use of OFPTableStats message.
Get table stats:
usage)
URI: /stats/table/<dpid>
method: GET
e.g.)
$ curl -X GET http://localhost:8080/stats/table/1
More infomation about this feature is described in the following URL.
http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#get-table-stats
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
In OF1.0, OFPMatch is required to specify MAC address as a binary
type value and to specify IPv4 Address as an int type value.
This behavior is differ from that in OF1.2+.
This patch makes OFPMatch in OF1.0 enable to support human readable
representation of MAC/IPv4 address like OF1.2+ API.
The current API in OF1.0:
>>> match = parser.OFPMatch(dl_src=b'\x01\x02\x03\x04\x05\x06',
... nw_src=167772163)
>>> match.dl_src
'\x01\x02\x03\x04\x05\x06'
>>> match.nw_src
167772163
The introduced API (the same as OF1.2+ API):
>>> match = parser.OFPMatch(dl_dst='aa:bb:cc:dd:ee:ff',
... nw_dst='192.168.0.1')
>>> match['dl_dst']
'aa:bb:cc:dd:ee:ff'
>>> match['nw_dst']
'192.168.0.1'
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The plugin that uses these was removed from OpenStack long ago.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch makes ofctl_rest enable setting instruction type of OFPIT_WRITE/CLEAR_ACTIONS.
e.g.)
$ curl -X POST -d '{
"dpid": 1,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"idle_timeout": 30,
"hard_timeout": 30,
"priority": 11111,
"flags": 1,
"match":{
"in_port":1
},
"actions":[
{
"type":"WRITE_ACTIONS",
"actions":[
{
"type":"POP_VLAN",
},
{
"type":"OUTPUT",
"port": 2
}
]
}
]
}' http://localhost:8080/stats/flowentry/add
$ curl -X POST -d '{
"dpid": 1,
"cookie": 1,
"cookie_mask": 1,
"table_id": 0,
"idle_timeout": 30,
"hard_timeout": 30,
"priority": 11111,
"flags": 1,
"match":{
"in_port":1
},
"actions":[
{
"type":"CLEAR_ACTIONS"
}
]
}' http://localhost:8080/stats/flowentry/add
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Add flows OFPIT_APPLY_ACTIONS and OFPIT_WRITE_ACTIONS and
OFPIT_CLEAR_ACTIONS as the type of instructions, respectively.
Then, the output results of get_flow_stats() are the same.
This patch fix this problem.
before applying this patch:
* case OFPIT_APPLY_ACTIONS and OFPIT_WRITE_ACTIONS
{
"1": [
{
"actions": [
"OUTPUT:2",
"OUTPUT:3"
],
...
}
]
}
* case OFPIT_CLEAR_ACTIONS
{
"1": [
{
"actions": [],
...
}
]
}
after apply this patch:
* case OFPIT_APPLY_ACTIONS
{
"1": [
{
"actions": [
"OUTPUT:2",
"OUTPUT:3"
],
...
}
]
}
* case OFPIT_WRITE_ACTIONS
{
"1": [
{
"actions": [
{
"WRITE_ACTIONS": [
"OUTPUT:4",
"OUTPUT:5"
]
}
],
...
}
]
}
* case OFPIT_CLEAR_ACTIONS
{
"1": [
{
"actions": [
"CLEAR_ACTIONS"
],
...
}
]
}
Reported-by: Liu, Weijie <wliu43@illinois.edu>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Currently, ofctl_v1_[23].py always converts metadata field into str
type for display, but does not convert pbb_isid and tunnel_id fields
even if these fields are masked.
So ofctl_v1_3.py fails to convert masked pbb_isid and tunnel_id fields.
This patch fixes to convert masked match field into str type and not
to convert non-masked field.
These changes will improve maintainability when ofctl_v1_*.py will
support new match fields.
Reported-by: Weijie Liu <wliu43@illinois.edu>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch adds explicit integer conversions to the IGMP timer
fields. This is necessary because Python 3's pack(...) does not
automatically coerce floating-point values to integers (Python 3
actually throws a struct.error on struct.pack('B', 1.0)).
This fixes IgmpQuerier._send_query and IgmpSnooper._do_query under
Python 3, and possibly other functions that pass/assign floats to the
`maxresp' attribute.
Signed-off-by: Fadi Moukayed <smfadi@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
There is no port information in output string of ENQUEUE in ofctl_v1_0.py
This patch fixes this problem.
Execution example is as follows.
curl -X GET http://localhost:8080/stats/flow/1
{
"1": [
{
"actions": [
"ENQUEUE:2:3" # ENQUEUE:<port>:<queue_id>
],
"byte_count": 0,
"cookie": 0,
"duration_nsec": 864000000,
"duration_sec": 107,
"hard_timeout": 0,
"idle_timeout": 0,
"match": {
"in_port": 5
},
"packet_count": 0,
"priority": 32768,
"table_id": 0
}
]
}
Reported-by: Weijie Liu <wliu43@illinois.edu>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The commit fba7213 is incomplete; doesn't parse properly so crashes
when serializing.
Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
|
|
Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
checksum() was modifying argument when it is bytearray. Make sure
checksum() doesn't modify its argument.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Some packet data are ascii type. Use {encode,decode} to make
python3's struct.pack happy.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch partially reverts 75e8c58916524243e6796e73c371981e14fff6ee
and 536a42d8c1c0be48e78d5f29b6fd55a38012d953. dhcp.sname is ascii.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
AsciiStringType data are mostly IP addresses and they must be
text_type in python3 for text_to_bin to work.
Also introduce AsciiStringListType, which is suitable for lists of
IP addresses.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
While msgpack has default binary-unicode conversion, the feature is
somehow disabled in ryu. As the other parts of ryu requires binary_type
data where they directly appear on-wire, simply follow the policy.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
b64encode is mainly used to encode binary data into JSON. As binary_type
isn't JSON serializable in python3, it makes more sense to convert to
binary_type early. Also, allow text_type to be base64 encoded.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
python3: Continuous patch to replace str to six.binary_type
Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
map() has been changed to return an iterator in python3. Iterators aren't
JSON serializable, and can be used only once for for loops.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|