summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib
AgeCommit message (Collapse)Author
2014-11-07ofctl_v1_0: Add remaining actionsYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-06bgp: fix _OptParamCapability parserFUJITA Tomonori
It could include multiple Capabilities. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-26packet lib: don't crash with truncated dhcp packetFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-26packet lib: don't crash with corrupted lldp packetFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Tested-by: Benjamin Eggerstedt <benjamin.eggerstedt@gmail.com>
2014-10-26ofctl_v1_0: match_to_str() does not convert nw_tos correctlyCharles M.C. Chan
The match_to_str() function in ryu/lib/ofctl_v1_0.py does not convert nw_tos correctly. As a result, we cannot obtain nw_tos value of any flow entry by invoking get_flow_stats() Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-20stplib.py: Should wildcard non-relevant bits in the mask field of port mod ↵fortitude.zhang
message for OpenFlow 1.2+. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-10bfdlib: follow TTL/hop limit in RFC5881 explicitly.Wei-Li Tang
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-10lib: add IPv4 single hop BFD (RFC5881) support.Wei-Li Tang
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-10packet lib: add BFD support.Wei-Li Tang
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-10-10ofctl_v1_0/2/3: check lock timeout by lock.is_set().Wei-Li Tang
send_stats_request never catches hub.Timeout exception because it has been caught by the event wait function itself. Signed-off-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-27bgp: ignore link-local addressHiroshi Yokoi
According to RFC 2545, both a global address and a link-local address can be sent as a next_hop address in BGPUpdate message. Since the link-local address is not needed in Ryu BGP, Ryu BGP ignore it if the address family is IPv6 unicast. Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-27Fix spell check in group feature message Maintain name consistency in meter ↵Sriram Natarajan
type in Meter Features message in OF 1.3 Add length field in group statistics reply in OF 1.2 Signed-off-by: Sriram Natarajan <natarajan.sriram@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-27ofctl: Add default value to type field of OFPGroupModYusuke Iwase
In OF1.2 and OF1.3 Spec, the group type need not be specified for the group delete request. However, an error occurs at mod_group_entry in ofctl_v1_[23].py without specifying group type to delete a group entry. This patch adds default value to type field of OFPGroupMod at mod_group_entry in order to reflect OpenFlow Specification. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-18of: Add missing fields in OpenFlow statistics messagesSriram Natarajan
update statistics structure to reflect OpenFlow specification. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-12ofctl_v1_0: correct flow modify messageMinoru TAKAHASHI
following fields is not set at mod_flow_stats command: * out_port, buffer_id this patch fixes this problem. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-12ofp_pktinfilter: add 'logging' optionSatoshi Kobayashi
When packet_in_filter discards a packet, it is always logging. However, it may be felt noisy. Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-07Snort Integrate:Che-Wei Lin
Remove the wrong way to get IP and bind with it. Binding with '0.0.0.0' and listen on all host. Update and fix typos in the snort_integrate.rst document. Fix the problem about pigrelay reconnect to ryu will not be accepted. Pigrelay is a program running on Snort that receive Snort alert from UNIX socket and send to Ryu via network socket. Signed-off-by: Che-Wei Lin <linton.tw@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-01Snort integrate: Add the snort lib supporting snort integration. Add an ↵John-Lin
sample application simple_switch_snort.py which can dump alert message. When there is a Snort alert message, Ryu will receive an event called EventAlert. You can easily define the event handler in the method which using ‘set_ev_cls’ decorator with snortlib.EventAlert parameter. The simple_switch_snort.py can install a flow that mirroring incoming packets to the snort's NIC which correspond the OpenFlow switch on port 3 (by default). There are two methods that sending alert message to Ryu. 1. Ryu and Snort are both on the same machine. Ryu receives alert message via Unix Domain Socket. 2. Ryu and Snort are separate on different machines. Ryu receives alert message via Network Socket. More detail see doc/snort_integrate.rst Signed-off-by: Che-Wei Lin <linton.tw@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-30packet lib: add linux cooked header supportFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-27packet bmp: fix Peer Down ReasonFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-20ofctl_rest: support OFPFlowStats filtered by fieldsYusuke Iwase
this patch enables ofctl_rest to get OFPFlowStats messages filtered by the OFPFlowStatsRequest fields in OpenFlow specification. usage) URI: /stats/flow/<dpid> method: POST the message body is as follows: table_id ID of table. out_port Require matching entries to include this as an output port. out_group Require matching entries to include this as an output group. (Not supported in of1.0) cookie Require matching entries to contain this cookie value. (Not supported in of1.0) cookie_mask Mask used to restrict the cookie bits that must match. (Not supported in of1.0) match Fields to match. e.g.) curl -X POST -d '{"table_id": 0, "out_port": 2, "cookie": 1, "cookie_mask": 1, "match":{"in_port":1}}' http://localhost:8080/stats/flow/1 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18bgp: make reserved private variableISHIDA Wataru
reserved field must be 0. this patch add an assertion and make reserved field invisible when stringified Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18bgp: encode 'next_hop' in human readable formatISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18bgp: use _class_suffixes to support various AddrPrefixISHIDA Wataru
the AddrPrefix which variable 'nlri' has is not limited to _BinAddrPrefix. this patch enables to encode to/decode from json dict with various AddrPrefix in 'nlri'. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18stringify: introduce _class_suffixes for easy jsonizeISHIDA Wataru
class variable '_class_suffixes' can be used for the same purpose as '_class_prefixes' but match with the suffix of the class name. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18bgp: move _TYPE declaration of IPAddrPrefix to the appropriate place.ISHIDA Wataru
_IPAddrPrefix can be inherited by labeled addr prefix. In that case, variable 'addr' is tuple and not string. so declare to parse 'addr' in 'ascii' format in _IPAddrPrefix cause following error. this patch fix this bug. p = LabelledIPAddrPrefix(28, ([1], '192.168.0.0')) p.to_jsondict() Traceback (most recent call last): File "./parse_labeled_addr_prefix.py", line 11, in <module> p.to_jsondict() File "/home/wataru/ryu/ryu/lib/stringify.py", line 210, in to_jsondict dict_[k] = encode(k, v) File "/home/wataru/ryu/ryu/lib/stringify.py", line 208, in <lambda> encode = lambda k, x: self._encode_value(k, x, encode_string) File "/home/wataru/ryu/ryu/lib/stringify.py", line 155, in _encode_value return cls._get_encoder(k, encode_string)(v) File "/home/wataru/ryu/ryu/lib/stringify.py", line 56, in encode return unicode(v, 'ascii') TypeError: coercing to Unicode: need string or buffer, tuple found Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18bgp: add support for RFC3107ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-15bgp: simplify CLUSTER_LIST attribute parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-14bgp: add BGP capability code 64 (graceful restart)FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-14bgp: add attribute ORIGINATOR_ID and CLUSTER_LISTXiao Peng
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-13bgp: fix bug of labels formatting for show VPNv4 prefix informationFUJITA Tomonori
The field of 'Labels' has not displayed in properly because of extracting 'label_list' in python slicing tuples. INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['rib', 'all'], 'format': 'cli'} Status codes: * valid, > best Network Labels Next Hop Reason Metric LocPrf Path/Origin Family: rtfilter *> 64512:64511:101 None 0.0.0.0 Only Path 2 Family: vpnv6 Family: vpnv4 *> 64511:101:10.10.0.1/32 ([17],) 192.168.100.100 Only Path 0 64511 2 *> 64511:101:10.20.2.0/24 ([100],) 0.0.0.0 Only Path 2 *> 64511:101:10.20.1.0/24 ([100],) 0.0.0.0 Only Path 2 *> 64511:101:10.20.3.0/24 ([100],) 0.0.0.0 Only Path 2 Family: ipv4 Family: ipv6 Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-09packet/bgp: add open capability code of 128Xiao Peng
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-07packet/bmp: fix bug of BMP Peer Down Notification classISHIDA Wataru
BMP Peer Down Notification packet must have a per-peer header. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-06packet/bgp: add 32bit AS number support to BGPPathAttributeAsPathISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-31bgp: add code to handle RD 0:0 at the head of nexthop network address in ↵Hiroshi Yokoi
MP_REACH_NLRI path attribute The second is patch to add or skip RD 0:0 label for the next_hop address in MP_REACH_NLRI attribute. According to RFC, next_hop address seems to be required to contain RD of 0 when advertise VPN prefix. This is defined in RFC 4659(3.2.1.1. BGP Speaker Requesting IPv6 Transport) for VPN-IPv6 and in RFC 4364(4.3.2. Route Distribution Among PEs by BGP) for VPN-IPv4. Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: add bmp(BGP Monitoring Protocol)ISHIDA Wataru
implements I-D grow-bmp-07 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: sctp: fix default argumentsMinoru TAKAHASHI
Reported-by: Arne Goetje <arne_goetje@accton.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: udp: fix default argumentsMinoru TAKAHASHI
Reported-by: Arne Goetje <arne_goetje@accton.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: tcp: fix default argumentsMinoru TAKAHASHI
Reported-by: Arne Goetje <arne_goetje@accton.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: ipv6: fix default argumentsMinoru TAKAHASHI
Reported-by: Arne Goetje <arne_goetje@accton.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30packet lib: ipv4: fix default argumentsMinoru TAKAHASHI
Reported-by: Arne Goetje <arne_goetje@accton.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-28ofctl_v1_2/3: fix unsuitable logMinoru TAKAHASHI
when using action type below, the log unsuitable is outputted: Unknown action type: [action type] * GOTO_TABLE, WRITE_METADATA, METER(only ofctl_v1_3.py) this patch fixes this problem. Reported-by: jalee <jalee@inno-tech.com.tw> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-28ofctl_v1_2/3: fix tcp_dst/src match fieldsMinoru TAKAHASHI
when enclosed the value of "ip_proto" in double quotes, following match fields is not set at mod_flow_stats command: * tcp_dst, tcp_src this patch fixes this problem. Reported-by: jalee <jalee@inno-tech.com.tw> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-28bgp: make marker private variableISHIDA Wataru
stop showing when stringified because it's noisy Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-18bgp: fix the way of getting RouteFamily objectHiroshi Yokoi
RouteFamily objects are treated as a singleton object. However they are created in peer.py, so I added method to get RouteFamily object in bgp.py and changed codes to use it. Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-17ofctl_rest: enable getting Description of a porttakahashi.minoru
this patch makes ofctl_rest enable getting Description of a port. usage) URI: /stats/portdesc/<dpid> method: GET e.g. ) curl http://localhost:8080/stats/portdesc/1 {"1": [{"hw_addr": "c6:d8:19:4a:e1:4f", "curr": 0, "supported": 0, "max_speed": 0, "advertised": 0, "peer": 0, "port_no": 4294967294, "curr_speed": 0, "name": "s1", "state": 1, "config": 1}, {"hw_addr": "8e:96:a1:14:d8:a1", "curr": 2112, "supported": 0, "max_speed": 0, "advertised": 0, "peer": 0, "port_no": 1, "curr_speed": 10000000, "name": "s1-eth1", "state": 0, "config": 0}]} Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-17ofctl_rest: support Port Modification Messagetakahashi.minoru
this patch makes ofctl_rest enable use of Port Modification Message. usage) URI: /stats/portdesc/modify method: POST the message body is as follows: dpid port_no (default:0) config (default:0) hw_addr (default:automatic-setting) mask (default:0) advertise (default:automatic-setting) e.g. ) curl -X POST -d '{"dpid": 1, "port_no": 1, "mask": 0b0000001, "config": 0b0000001}' http://localhost:8080/stats/portdesc/modify Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-17ofctl_v1_2/3: fix POP_MPLS action and some match fieldstakahashi.minoru
The following causes an error at mod_flow_entry command - ofctl_v1_2.py * match field: metadata, mpls_label - ofctl_v1_3.py * match field: in_phy_port and the following causes an error at get_flow_stats command - ofctl_v1_2.py * action: POP_MPLS * match field: metadata, ipv6_nd_target - ofctl_v1_3.py * action: POP_MPLS * match field: ipv6_nd_target this patch fixes them. Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-03ospf: describe prefix in one attribute 'prefix' for ease of useISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-03ospf: add segment routing opaque typesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>