-
Notifications
You must be signed in to change notification settings - Fork 35
Crash when OFPT_ERROR comes with incomplete data #440
Comments
Hi @amlight thanks for the feedback. Firstly, I've uploaded the pcap file (zipped) here for tracking/history purposes. |
@renanrodrigo please, take a look at it. While dealing with error messages, if we can't unpack the message that generated the error we may get the unpack exception an deal with it.
|
The OpenFlow 1.0 specification says switches must send back at least 64 bytes of the bad request with the error packet, so we can expect that many messages won't be unpacked correctly. |
I think we should try to unpack the message if possible. The XID helps, it is how we have being doing all this time at AmLight, but having the source message unpacked helps a lot. Sometimes we install dozen of flows in parallel. My suggestion:
|
@amlight Roger that; working on it. |
A possible misled interpretation is that the message sent to the switch was only the header. Besides, we would lose information past 8 bytes that cannot be completely unpacked. |
@renanrodrigo stand in position sr. @amlight I agree with @cemsbr, we discussed and we think that saving only partial data is inconsistent. Packing and Unpacking an OpenFlow Object must be bi-directional, and your proposal breaks this. If we add a method, let's say for instance Also, I think that this issue title is strange. So far we remember, today we don't unpack |
When an OFPT_FLOW_MOD is rejected through an OFPT_ERROR, some vendors add the OFPT_FLOW_MOD message as part of the data field in the OFPT_ERROR. Some vendors don't send anything and Brocade does a mix: send only part of the message. The python-openflow tries to extract the full flow-mod but crases because buffer is not big enough.
Libpcap provided in the link [1]. It would be good that, in situations such as this one, the python-openflow just ignored the data (or extract only the first 8 bytes (header)).
[1] https://dl.dropboxusercontent.com/u/38035109/of10-3.pcap
The text was updated successfully, but these errors were encountered: