Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Issue:- when sending a trap, the second trap in the list does not get the proper source IP and cause erroneous determinations by the trap receiver and statistics and not aggregated properly.
Version-Release number of selected component (if applicable):
# rpm -qi net-snmp
Name : net-snmp
Epoch : 1
Version : 5.8
Release : 14.el8
Architecture: x86_64
Install Date: Mon 19 Oct 2020 02:32:09 PM UTC
Group : Unspecified
Size : 893577
License : BSD
Signature : RSA/SHA256, Mon 16 Mar 2020 11:41:14 AM UTC, Key ID 199e2f91fd431d51
Source RPM : net-snmp-5.8-14.el8.src.rpm
Build Date : Mon 16 Mar 2020 10:21:24 AM UTC
Build Host : x86-vm-08.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://net-snmp.sourceforge.net/
Summary : A collection of SNMP protocol tools and libraries
So there should be a BZ opened for the issue and the fix appears to be roughly:
"re-initializing the new copy's source member (the original 'source' member is already squirrel away in a stack variable) seems to have done the trick"
attaching the RedHatCase03177898Diagnostic.tar.gz so that engineering can see how the problem happens
=====
I also downloaded the source from sourceforge for net-snmp 5.8 which is the version we are using and I think I found something in the net-snmp code, in snmplib/snmp_transport.c in netsnmp_tdomain_transport_tspec() there's a for loop
for(;;) {
if (match) {
netsnmp_transport *t = NULL;
const char* addr2;
any_found = 1;
/*
* Ok, we know what domain to try, lets see what default data
* should be used with it
*/
if (default_target != NULL)
addr2 = default_target;
else
addr2 = netsnmp_lookup_default_target(application,
match->prefix[0]);
DEBUGMSGTL(("tdomain",
"trying domain \"%s\" address \"%s\" "
"default address \"%s\"\n",
match->prefix[0], addr ? addr : "[NIL]",
addr2 ? addr2 : "[NIL]"));
if (match->f_create_from_tspec) {
netsnmp_tdomain_spec tspec_tmp;
memcpy(&tspec_tmp, tspec, sizeof(tspec_tmp));
so it creates essentially a local copy of the passed in tspec in course of processing the 'source' member of tspec can get initialized from NULL (if that's the case) and so the second time around through this loop, the new copy inherits the updated 'source' and then tries to bind and fails saying 'Address in use' so then this trapsink (the second one in the list regardless of any specifics)
doesn't do the right thing. so reinitializing the new copy's source member (the original 'source' member is already squirrel away in a stack variable) seems to have done the trick
Comment 6RHEL Program Management
2023-09-21 21:31:40 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.
Comment 7RHEL Program Management
2023-09-21 22:08:12 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.
Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.
To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:
"Bugzilla Bug" = 1234567
In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.