[Ryu-devel] [PATCH] Clean up syntax in services/protocols/bgp/operator/views/base.py to avoid SyntaxErrors

2016-01-21 Thread Victor Orlikowski
When byte-compiled, base.py in the bgp protocol service generates a large number of SyntaxErrors for me. This patch cleans up the SyntaxErrors, while retaining the original (intended?) semantics. Signed-off-by: Victor J. Orlikowski diff --git a/ryu/services/protocols/bgp/operator/views/base.py

[Ryu-devel] [PATCH] Ensure that usage of icmp.dest_unreach and icmp.TimeExceeded in rest_router.py complies with RFC 792

2016-01-21 Thread Victor Orlikowski
According to RFC 792, the Destination Unreachable and Time Exceeded ICMP types should have the following as data: "Internet Header + 64 bits of Original Data Datagram” We should ensure, when creating ICMP packets of these types, that the amount of data sent compiles with the RFC. The only sampl

[Ryu-devel] [PATCH] Better validate parameters to constructors better in lib/packet/icmp.py

2016-01-21 Thread Victor Orlikowski
According to RFC 792, the Destination Unreachable and Time Exceeded ICMP types should have the following as data: "Internet Header + 64 bits of Original Data Datagram” We do not validate this, but we *should* ensure that: 1) The data_len passed in fits into a single octet 2) The length of the da

[Ryu-devel] [PATCH] Typo fixes in lib/packet/bgp.py

2016-01-21 Thread Victor Orlikowski
A couple of minor typo fixes. Signed-off-by: Victor J. Orlikowski diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index cad4380..bbb52ec 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -2009,7 +2009,7 @@ class BGPPathAttributeMpReachNLRI(_PathAttribute): eli

Re: [Ryu-devel] [PATCH 1/2] of14_parser: unify OFPActionExperimenter implementation

2016-01-21 Thread FUJITA Tomonori
On Thu, 21 Jan 2016 13:31:54 +0900 Minoru TAKAHASHI wrote: > Currently, there is different OFPActionExperimenter implementation of between > of_parser_v14 and v13/5. > Because the implementation of v13/5 is better than v14, this patch fixes to > of_parser_v14 for unification the implementation.

Re: [Ryu-devel] Error while getting vlan Id

2016-01-21 Thread David Gabriel
Thanks so much Victor for your help. Your code fixes my problem. 2016-01-21 4:35 GMT-08:00 Victor Orlikowski : > On Jan 21, 2016, at 5:33 AM, David Gabriel wrote: > > > I am getting an error when I want to get the *vlan id* of packets. > In fact, I am using the following code I found here >

Re: [Ryu-devel] Error while getting vlan Id

2016-01-21 Thread Victor Orlikowski
On Jan 21, 2016, at 5:33 AM, David Gabriel mailto:[email protected]>> wrote: I am getting an error when I want to get the vlan id of packets. In fact, I am using the following code I found here pkt = packet.Packet(array.arr

[Ryu-devel] Error while getting vlan Id

2016-01-21 Thread David Gabriel
Dears, I am getting an error when I want to get the *vlan id* of packets. In fact, I am using the following code I found here pkt = packet.Packet(array.array('B', ev.msg.data)) for p in pkt: print p.protocol_name, p