Skip to content

Fix multiple PDU processing#18

Open
mkhon wants to merge 1 commit intohosthvo:masterfrom
mkhon:fix-recv_pdu
Open

Fix multiple PDU processing#18
mkhon wants to merge 1 commit intohosthvo:masterfrom
mkhon:fix-recv_pdu

Conversation

@mkhon
Copy link

@mkhon mkhon commented Aug 8, 2019

recv_pdu() receives up to 1024 bytes at once from the agentx
socket into a parsing buffer. Then the buffer is interpreted
as a single PDU even if the buffer contained more than one PDU.

Fix this by using payload_length field of AgentX PDU header and
saving remaining unparsed buffer for the next recv_pdu() call.

socket into a parsing buffer. Then the buffer is interpreted
as a single PDU even if the buffer contained more than one PDU.

Fix this by using payload_length field of AgentX PDU header and
saving remaining unparsed buffer for the next recv_pdu() call.
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

Successfully merging this pull request may close these issues.

1 participant