1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Reply to a snmpEngineID discovery PDU with a Report PDU as per the

requirements of RFC 3414 section 4.

PR:	174974
Submitted by:	pguyot@kallisys.net
Reported by:	several people
Reviewed by:	bz@
This commit is contained in:
Shteryana Shopova 2016-11-10 20:51:26 +00:00
parent cc59e3a79b
commit 3b49535a5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308490

View File

@ -171,7 +171,10 @@ snmp_pdu_create_response(const struct snmp_pdu *pdu, struct snmp_pdu *resp)
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;