Date: Thu, 10 Nov 2016 20:51:26 +0000 (UTC) From: Shteryana Shopova <syrinx@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308490 - head/contrib/bsnmp/lib Message-ID: <201611102051.uAAKpQjT033920@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611102051.uAAKpQjT033920>