mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 22:06:10 +02:00
of1.3: fix OFPort parser
s/length/_length/
Trace:
[0x1000082e5f694c00] ('143.0.1.211', 56538): OFPGetConfigReply received:
flags=NORMAL miss_send_len=1518
Error in the datapath 1000082e5f694c00 from ('143.0.1.211', 56538)
hub: uncaught exception: Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/lib/hub.py", line 48, in _launch
func(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/controller/controller.py", line 312, in datapath_connection_factory
datapath.serve()
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/controller/controller.py", line 232, in serve
self._recv_loop()
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/controller/controller.py", line 97, in deactivate
method(self)
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/controller/controller.py", line 165, in _recv_loop
version, msg_type, msg_len, xid, buf)
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/ofproto/ofproto_parser.py", line 54, in msg
return msg_parser(datapath, version, msg_type, msg_len, xid, buf)
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/ofproto/ofproto_v1_3_parser.py", line 50, in msg_parser
return parser(datapath, version, msg_type, msg_len, xid, buf)
File "/usr/local/lib/python2.6/dist-packages/ryu-2.1-py2.6.egg/ryu/ofproto/ofproto_v1_3_parser.py", line 2192, in parser
offset += b._length
AttributeError: 'OFPPort' object has no attribute '_length'
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
24e9c1546d
commit
c2c8d4311b
@ -1485,7 +1485,7 @@ class OFPPort(ofproto_parser.namedtuple('OFPPort', (
|
||||
def parser(cls, buf, offset):
|
||||
port = struct.unpack_from(ofproto_v1_3.OFP_PORT_PACK_STR, buf, offset)
|
||||
ofpport = cls(*port)
|
||||
ofpport.length = ofproto_v1_3.OFP_PORT_SIZE
|
||||
ofpport._length = ofproto_v1_3.OFP_PORT_SIZE
|
||||
return ofpport
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user