I would like to limit my agent's response to GET BULK requests to 50 (or some configured value). I see the SnmpPDU class has a setMaxRepetitions() method but since my agent code is generated from our MIB, the code I see does not deal with PDU's directly (I guess PDU building is hidden somewhere in the agent libraries). I see that my main class extends SnmpAgent and I see that this class has a send(SnmpPDU) method, so I tried overriding this and setting the max repetitions before calling super.send() but that did not work. Can anyone suggest how this should be done?
  • No status
Hi dtmansy ,

You can limit those values only at the manager end.There is nothing to do in Agent's side.
In UI-based manager application you can change it in MibBrowser Settings
else you can change it in command-line application inputs i.e Max-Repetitors & Non-Repetitors value
try with with our example application snmpbulk.java which i have attached
kindly refer the following link in our help documentations
http://snmp.adventnet.com/help/snmpapi/snmpv3/snmp_operations/snmp_getbulk.html

Kind Regards
Attachments
Hi tmanoj,

Thanks. I understand that those values can be limited at the manager end. But I wanted to add some protections in my application to prevent a hostile manager from attacking me by sending getbulk requests with no or very large limits forcing my agent to return thousands of OIDs using CPU and other resources. It would be nice to add a configurable max that would protect my agent and still be satisfactory to the real managers in our network.
Post Actions
Statistics
  • 2
     Replies
  • 1171
     Views
  • 0
     Followers
Tags for the post
No tags available for this topic.
© 2009 Corp. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers

Edit Link Delete Link

Edit Link Delete Link

LoadingImage