svn commit: r308490 - head/contrib/bsnmp/lib
Shteryana Shopova
syrinx at FreeBSD.org
Thu Nov 10 20:51:27 UTC 2016
Author: syrinx
Date: Thu Nov 10 20:51:26 2016
New Revision: 308490
URL: https://svnweb.freebsd.org/changeset/base/308490
Log:
Reply to a snmpEngineID discovery PDU with a Report PDU as per the
requirements of RFC 3414 section 4.
PR: 174974
Submitted by: pguyot at kallisys.net
Reported by: several people
Reviewed by: bz@
Modified:
head/contrib/bsnmp/lib/snmpagent.c
Modified: head/contrib/bsnmp/lib/snmpagent.c
==============================================================================
--- head/contrib/bsnmp/lib/snmpagent.c Thu Nov 10 19:55:45 2016 (r308489)
+++ head/contrib/bsnmp/lib/snmpagent.c Thu Nov 10 20:51:26 2016 (r308490)
@@ -171,7 +171,10 @@ snmp_pdu_create_response(const struct sn
memset(resp, 0, sizeof(*resp));
strcpy(resp->community, pdu->community);
resp->version = pdu->version;
- resp->type = SNMP_PDU_RESPONSE;
+ if (pdu->flags & SNMP_MSG_AUTODISCOVER)
+ resp->type = SNMP_PDU_REPORT; /* RFC 3414.4 */
+ else
+ resp->type = SNMP_PDU_RESPONSE;
resp->request_id = pdu->request_id;
resp->version = pdu->version;
More information about the svn-src-all
mailing list