summaryrefslogtreecommitdiff
path: root/testing/tests/T058agentauthtrap
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/T058agentauthtrap')
-rw-r--r--testing/tests/T058agentauthtrap36
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/tests/T058agentauthtrap b/testing/tests/T058agentauthtrap
new file mode 100644
index 0000000..7be3a7b
--- /dev/null
+++ b/testing/tests/T058agentauthtrap
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+. ../eval_tools.sh
+
+HEADER authentication failure traps are sent by snmpd
+
+SKIPIF NETSNMP_DISABLE_SNMPV1
+
+#
+# Begin test
+#
+
+# standard V1 configuration: testcommunity
+. ./Sv1config
+# add in a v1 trap sink
+CONFIGAGENT trapsink $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPTRAPD_PORT public
+CONFIGAGENT authtrapenable 1
+CONFIGTRAPD authcommunity log public
+CONFIGTRAPD agentxsocket /dev/null
+
+STARTTRAPD
+
+STARTAGENT
+
+# give the agent more time to start up. We only want to fire one
+# request (retries = 0) to make sure only one trap is sent.
+#DELAY
+CAPTURE "snmpget -On -r 0 -t 5 $SNMP_FLAGS -v 1 -c wrongcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0"
+
+STOPAGENT
+
+STOPTRAPD
+
+CHECKTRAPD "Authentication Failure Trap"
+
+FINISHED