author | Petr Cvachoucek <petr.cvachoucek@oracle.com> |
Tue, 26 Jun 2012 23:39:53 -0700 | |
branch | s11-sru |
changeset 2298 | b90913c3e10b |
parent 252 | ee0fb1eabcbf |
permissions | -rw-r--r-- |
2298
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
1 |
--- a/agent/mibgroup/ucd-snmp/proxy.c 2006-10-17 18:16:29.000000000 +0200 |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
2 |
+++ b/agent/mibgroup/ucd-snmp/proxy.c 2012-03-27 09:02:10.488425400 +0200 |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
3 |
@@ -396,6 +396,8 @@ |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
4 |
|
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
5 |
if (!pdu || !sp) { |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
6 |
netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_GENERR); |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
7 |
+ if (pdu) |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
8 |
+ snmp_free_pdu(pdu); |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
9 |
return SNMP_ERR_NOERROR; |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
10 |
} |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
11 |
|
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
12 |
@@ -408,6 +410,8 @@ |
252
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
13 |
/* |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
14 |
* too large |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
15 |
*/ |
2298
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
16 |
+ if (pdu) |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
17 |
+ snmp_free_pdu(pdu); |
252
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
18 |
snmp_log(LOG_ERR, |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
19 |
"proxy oid request length is too long\n"); |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
20 |
return SNMP_ERR_NOERROR; |
2298
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
21 |
@@ -437,6 +441,8 @@ |
252
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
22 |
*/ |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
23 |
if (!proxy_fill_in_session(handler, reqinfo, (void **)&configured)) { |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
24 |
netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_GENERR); |
2298
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
25 |
+ if (pdu) |
b90913c3e10b
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
Petr Cvachoucek <petr.cvachoucek@oracle.com>
parents:
252
diff
changeset
|
26 |
+ snmp_free_pdu(pdu); |
252
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
27 |
return SNMP_ERR_NOERROR; |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
28 |
} |
ee0fb1eabcbf
7041085 move net-snmp to userland
gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
parents:
diff
changeset
|
29 |