Description of problem: Having following /etc/snmp/snmpd.conf file, if snmpd fails to bind the specified clientaddr port, it quietly uses random port instead. It should at least report some error to system log. rocommunity public [snmp] clientaddr 127.0.0.1:30000 trapsink localhost public Version-Release number of selected component (if applicable): net-snmp-5.3.2.2-18 How reproducible: always Steps to Reproduce: 1. vi /etc/snmp/snmpd.conf 2. nc -ul localhost 30000 (or have SELinux in enforcing mode) 3. service snmpd start Actual results: - traps are sent from random port and not from port 30000, which is taken by 'nc' - system log is empty Expected results: - system log should show an error
Look at upstream's snmplib/transports/snmpUDPIPv4BaseDomain.c:190 /* Retry with port = 0 */ client_addr.sin_port = 0;
This bug is in the same code as regression #845974, it makes sense to fix them together.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: This is regression found in internal build, it has not been released. No documentation needed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0124.html