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

Fix snmp result #627

Merged
merged 1 commit into from
Nov 30, 2020
Merged

Conversation

jjnicola
Copy link
Member

What:
Only return the value and do not stop in the first \n.

Why
The response includes the OID, which is not desired.

How:
Running the following script again a snmp agent, the response should not include the OID.

oid = '.1.3.6.1.2.1.1.1.0';
protocol = 'udp';
port = 161;
community = 'public';

display("version 1");
ret = snmpv1_get( port:port, oid:oid, protocol:protocol, community:community );
display (ret, "\n");

Checklist:

Copy link
Member

@cfi-gb cfi-gb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the functionality and can confirm the fix. Final review and approval needs to be done by a @greenbone/gvm-dev member.

CHANGELOG.md Outdated Show resolved Hide resolved
nasl/nasl_snmp.c Outdated Show resolved Hide resolved
Only return the value and do not stop in the first \n.
Copy link
Member

@cfi-gb cfi-gb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the text changes and approve them.

Full review, approval and merging still needs to be done by a @greenbone/gvm-dev member.

@jjnicola jjnicola merged commit 9b30a5b into greenbone:openvas-20.08 Nov 30, 2020
@jjnicola jjnicola deleted the snmp-regression branch November 30, 2020 13:48
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.

None yet

3 participants