Sending a broadcast UDP snmp message to a device running snmpd 5.2.5.1 will fail:
client:
$ snmpget -v 2c -c public 255.255.255.255 iso.org.dod.internet.mgmt.mib-2.system.sysObjectID.0
server:
$ tail -f snmpd.log
Turning on AgentX master support.
NET-SNMP version 5.2.5.1
send response: Failure in sendto
-- .1.3.6.1.2.1.1.2.0
I did a git bisect and narrowed it down to this commit:
09ee3c4 2006-09-14 22:13:07 +0000 Wes Hardaker: NEWS: snmplib: PATCH: 1553447: responses will get sent from the original dest IP address
The feature worked until then. It does not seem to me that this was on purpose. Has this been fixed in a newer version?
revert commit that disabled broadcast SNMP
To fix this in v5.2.5, I reverted the offending commit. I'd be willing to look into this further if I knew I was on the right track. That is: that the original intent of 09ee3c4 wasn't to disable SNMP broadcast responses.
The first step is to find out yourself whether this works with one of the still maintained versions (5.4, 5.5, 5.6 or 5.7).
It looks like this commit fixes it:
948f129132b2389c56b9c444f80032245dc2f6c5
Author: Jan Safranek jsafranek@users.sourceforge.net 2009-12-01 02:34:43
Committer: Jan Safranek jsafranek@users.sourceforge.net 2009-12-01 02:34:43
Parent: 7aa870ff83af082ed83e9441f5ad6f6c29ae16bb (Make it possible to actually compile after 17852.)
Branches: master, remotes/origin/master, remotes/upstream/V5-7-branches, remotes/upstream/V5-7-patches, remotes/upstream/master, remotes/upstream/windows-mib-implementations
Follows: v5.5
Precedes: v5.6.pre1
Let me confirm this in > 5.6
Thanks for the bug report!
We've fixed the problem in the 5.6.x and 5.7.x code branches and the main development tree, so it should be fixed in future releases of the Net-SNMP package.
confirmed fixed in 5.6.1
sorry for the false alarm.
It doesn't seem to be fixed. I'm using net-snmp 5.7.2.1. I still get "Failure in sendto". If I turn on the SNMP_FLAGS_UDP_BROADCAST flag in snmp_api.c (https://sourceforge.net/p/net-snmp/bugs/2334/), I get "Timeout". Am I missing something?
Thanks,
RS
RS,
This bug is about an agent responding to broadcast requests. Your question seems to be about sending broadcast requests.
Oops! read the question wrong!
But could you answer my question?!