5
HEADER Proxy illegal SET handling support
7
SKIPIFNOT USING_UCD_SNMP_PROXY_MODULE
8
SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE
14
# standard V3 configuration for initial user
17
CONFIGAGENT proxy -t 2 -r 1 -v 2c -c testcommunity $SNMP_TRANSPORT_SPEC:${SNMP_TEST_DEST}7676 system
19
# Start the agent without initializing the system mib.
20
ORIG_AGENT_FLAGS="$AGENT_FLAGS"
21
AGENT_FLAGS="$ORIG_AGENT_FLAGS -I -system_mib -Dproxy"
24
# test to see that the current agent doesn't support the system mib
25
#CAPTURE "snmpget -On -t 3 $SNMP_FLAGS -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0"
27
#CHECK ".1.3.6.1.2.1.1.3.0 = No Such Object"
29
#if test "$snmp_last_test_result" = 1; then
30
# test the proxy subagent by first running it...
32
SNMP_SNMPD_PID_FILE_ORIG=$SNMP_SNMPD_PID_FILE
33
SNMP_SNMPD_LOG_FILE_ORIG=$SNMP_SNMPD_LOG_FILE
34
SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE.num2
35
SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE.num2
36
SNMP_CONFIG_FILE="$SNMP_TMPDIR/proxy.conf"
37
echo "rwcommunity testcommunity" >> $SNMP_CONFIG_FILE
38
# echo "syscontact testcontact" >> $SNMP_CONFIG_FILE
39
AGENT_FLAGS="$ORIG_AGENT_FLAGS -Dmib_init"
40
ORIG_SNMP_SNMPD_PORT=$SNMP_SNMPD_PORT
41
SNMP_SNMPD_PORT="7676"
43
SNMP_SNMPD_PORT=$ORIG_SNMP_SNMPD_PORT
45
# test to see that the agent now supports the system mib
46
CAPTURE "snmpget -On $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT sysContact.0"
49
# we don't know the real value, unfortunately, so we test for what
50
# we should *not* get back.
51
CHECK ".1.3.6.1.2.1.1.4.0 = No Such Object"
53
if test "$snmp_last_test_result" = 0; then
55
# test to see that the agent now supports the system mib
56
CAPTURE "snmpset -On -Ir $SNMP_FLAGS -t 5 -v 3 -a MD5 -A initial_test_pass_auth -l anp -u initial $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT sysContact.0 i 42"
58
CHECK ".1.3.6.1.2.1.1.4.0 = Wrong Type"
65
SNMP_SNMPD_PID_FILE=$SNMP_SNMPD_PID_FILE_ORIG
66
SNMP_SNMPD_LOG_FILE=$SNMP_SNMPD_LOG_FILE_ORIG
69
# stop the master agent