Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2018 23:38:31 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332397 - stable/11/contrib/bsnmp/lib
Message-ID:  <201804102338.w3ANcVrJ080757@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Apr 10 23:38:31 2018
New Revision: 332397
URL: https://svnweb.freebsd.org/changeset/base/332397

Log:
  MFC r308490 by syrinx:
  
  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

Modified:
  stable/11/contrib/bsnmp/lib/snmpagent.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/bsnmp/lib/snmpagent.c
==============================================================================
--- stable/11/contrib/bsnmp/lib/snmpagent.c	Tue Apr 10 23:29:57 2018	(r332396)
+++ stable/11/contrib/bsnmp/lib/snmpagent.c	Tue Apr 10 23:38:31 2018	(r332397)
@@ -171,7 +171,10 @@ snmp_pdu_create_response(const struct snmp_pdu *pdu, s
 	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?201804102338.w3ANcVrJ080757>