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.
Bug 825889 - snmpd transmits reply UDP packets on incorrect interface
Summary: snmpd transmits reply UDP packets on incorrect interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp
Version: 6.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-29 00:56 UTC by Benjamin LaHaise
Modified: 2013-11-21 20:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, the snmpd daemon was updated to send SNMP responses to broadcast requests from the same interface on which the SNMP was received. However, this update also introduced an error which prevented it from sending responses to unicast request on multihomed machines (that is, on machines with multiple network interfaces, each facing a different network). This update corrects this error so that the snmpd daemon is now able to both answer unicast requests on multihomed machines and send responses to broadcast requests from the same interface on which the request was received.
Clone Of:
Environment:
Last Closed: 2013-02-21 10:27:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for snmpd (493 bytes, patch)
2012-05-29 00:56 UTC, Benjamin LaHaise
no flags Details | Diff
patch from RHEL 5 (890 bytes, patch)
2012-07-26 12:06 UTC, Michal Žejdl
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0421 0 normal SHIPPED_LIVE net-snmp bug fix and enhancement update 2013-02-20 20:49:35 UTC

Description Benjamin LaHaise 2012-05-29 00:56:47 UTC
Created attachment 587291 [details]
patch for snmpd

Description of problem:

snmpd transmits reply UDP packets on incorrect interface on routers with multiple subnets.

Version-Release number of selected component (if applicable):

net-snmp-5.5-37.el6.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Turn off rp_filter in the kernel.

2. Configure a host with 2 ethernet interfaces on different subnets (subnet A.A.A.0 and B.B.B.0 with a default route to a host on A.A.A.something).

3. Send an snmp query from a device C.C.C.C such that it is received by the device (not on subnet A.A.A.0 or B.B.B.0, but reachable via the default route on A.A.A.something) under test on the B.B.B.0 subnet, but where the response must be sent to C.C.C.C via the default route on the A.A.A.0 subnet.

4. Observe that packets to C.C.C.C are sent out on the B.B.B.0 subnet, and not following the default route.
  
Actual results:

UDP packets sent ignore routes on the system.

Expected results:

SNMP UDP packets should use the routing table.

Additional info:

This config is commonly encountered on routers.  Depending on which IP address is used to query SNMP, SNMP responses may or may note be correctly sent.  Incorrect behaviour is visible when the DUT sends ARP queries for C.C.C.C on subnet B.B.B.0.  Attached is a proposed fix that allows the kernel to select which interface to transmit on, while keeping the specification of the source ip address in sendmsg().

Comment 2 Jan Safranek 2012-05-29 07:42:07 UTC
You are not the first who requests such feature, but I am afraid it contradicts with other requirements.

Some people (mainly running some cluster suites or so) strictly require, that if snmpd gets a request, it must respond from the same interface. These people run servers with several network interfaces facing the same network and kernel could choose different interface when sending UDP response with cmsg.ipi.ipi_ifindex = 0.

Therefore I consider it as RFE. I'll think about introduction of new snmpd.conf option which would turn the kernel routing on/off.

Please also consider contacting your Red Hat support, bugs without support ticket have lower priority.

Comment 4 Michal Žejdl 2012-07-26 12:06:57 UTC
Created attachment 600495 [details]
patch from RHEL 5

solved already in RHEL 5 and upstream

see https://bugzilla.redhat.com/show_bug.cgi?id=600319

Problem raised with broadcast-response.patch, which was corrected later to preserve good old ipi_ifindex = 0 behavior.

I don't understand why this patch has not been applied in RHEL 6.

Comment 11 errata-xmlrpc 2013-02-21 10:27:11 UTC
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/RHBA-2013-0421.html


Note You need to log in before you can comment on or make changes to this bug.