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

Community string too long #1

Closed
dirtdiver512 opened this issue Oct 4, 2016 · 1 comment
Closed

Community string too long #1

dirtdiver512 opened this issue Oct 4, 2016 · 1 comment

Comments

@dirtdiver512
Copy link

I get this error if the input file is 121 lines of strings

@WhiteWinterWolf
Copy link

Hello dirtdiver512,

I encountered the same issue as you. The problem does not come from the size of the file, but most likely from the fact that at least one of the community strings it contains is longer than 16 characters, the maximum size allowed by onesixtyone.

As per my understanding, this limitation is arbitrary, and should be raised since some devices accept and use longer community strings.

You will find attached a patch which does the following things:

  • Add "TENmanUFactOryPOWER" to the dict.txt file. This is the default community string for some APC devices and allows to test the issue.
  • Raise the maximum community string length to 32.
  • Modify the definition of the timeval_subtract() function from inline to static inline since GCC was choking on this. I'm not sure there is any advantage in defining this function as inline, but in all cases it seems it must be explicitly defined either as extern inline or static inline to be compilable by GCC.

Regards,

onesixtyone_issue1_toolong.patch.txt

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

3 participants
@dirtdiver512 @WhiteWinterWolf and others