From cdcf73c88b1e12dc1837dc1abd23274f8aa227e4 Mon Sep 17 00:00:00 2001 From: paulino Date: Sun, 10 Dec 2017 06:27:44 +0000 Subject: [PATCH] Reads version string from options. Fixes #1064. --- nselib/snmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/snmp.lua b/nselib/snmp.lua index 3b8ec98bc..a73a1e1f7 100644 --- a/nselib/snmp.lua +++ b/nselib/snmp.lua @@ -429,7 +429,7 @@ Helper = { --- Creates a new Helper instance -- -- @param host string containing the host name or ip - -- @param port number containing the port to connect to + -- @param port table containing the port details to connect to -- @param community string containing SNMP community -- @param options A table with appropriate options: -- * timeout - the timeout in milliseconds (Default: 5000) @@ -488,7 +488,7 @@ Helper = { request = function (self, message) local payload = encode( buildPacket( message, - self.version, + self.options.version, self.community ) )