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

Error in parse strings with variable length #80

Closed
testsgmr opened this issue Nov 29, 2018 · 5 comments
Closed

Error in parse strings with variable length #80

testsgmr opened this issue Nov 29, 2018 · 5 comments
Labels

Comments

@testsgmr
Copy link
Contributor

According to RFC7011 Section 6.1.6, "The string is sent as an array of zero or more octets using Information Element fixed or variable length." we can have a variable length "In the Template Set, the Information Element Field Length is as 65535. This reserved length value notifies the that the value of the Information Element will be carried the Information Element content itself." but this is not supported by vFlow and use 65535 for the size of all of the strings.

@testsgmr testsgmr changed the title Error in pare string with variable length Error in parse strings with variable length Nov 29, 2018
@pforemski
Copy link

Agreed, found this after 1h of debugging. Had to trace the ambiguous 'ipfix.go:232: "can not read the data"' error message to actually arrive at ipfix/decoder.go Decoder.decodeData()'s first loop - which is the source of this error message.

This is so disappointing that vFlow actually does not implement IPFIX - but rather a subset of the RFC.

@mehrdadrad mehrdadrad added the bug label Dec 4, 2018
@mehrdadrad
Copy link
Collaborator

mehrdadrad commented Dec 4, 2018

@mohamadrezarostami thanks for catching this! pls resolve the conflict #81
BTW our routers send fix len for string/octets

@testsgmr
Copy link
Contributor Author

testsgmr commented Dec 9, 2018

@mehrdadrad I fix it ,but I don't know why tests doesn't pass :(

@mehrdadrad
Copy link
Collaborator

@mohamadrezarostami I merged a bug fix right after you changed the decodeData, pls first update your repo then add getDataLength feature to the decodeData. thanks!

@testsgmr
Copy link
Contributor Author

@mehrdadrad I fix it.

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

No branches or pull requests

3 participants