Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when OFPT_ERROR comes with incomplete data #62

Open
ajoaoff opened this issue Jun 28, 2021 · 0 comments
Open

Crash when OFPT_ERROR comes with incomplete data #62

ajoaoff opened this issue Jun 28, 2021 · 0 comments

Comments

@ajoaoff
Copy link

ajoaoff commented Jun 28, 2021

Original issue opened by @amlight at kytos#440.

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.

Error: FlowMod.buffer_id; unpack_from requires a buffer of at least 4 bytes; fmt = !I, buff = b'\x008 \xfe\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00', offset = 56.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant