Bug 156178

Summary: Fix for net-mgmt/net-snmp in multihomed environments
Product: Ports & Packages Reporter: Nikolay Denev <ndenev>
Component: Individual Port(s)Assignee: Sylvio Cesar Teixeira <sylvio>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Nikolay Denev 2011-04-04 16:00:21 UTC
Net-Snmp uses a Linux feature IP_PKTINFO to handle multihomed snmp enabled hosts, and make sure that
the snmp packets in response to a snmp query will be returned with source the same IP that was queried. 
On FreeBSD the issue is that when queried the host will respond with the IP assigned by the IP stack -  the address of the interface that has the route to the host that sent the query. 
The snmp client tools handle this, but if one uses statefull firewall in between the answer can be dropped.

So basically this makes net-snmp on freebsd to use IP_RECVDSTADDR to provide the same "predictable" behavior as on Linux.

I've posted this patch to the net-snmp developers but got no response :
http://sourceforge.net/tracker/?func=detail&aid=3175640&group_id=12694&atid=312694

Fix: Apply the provided patch.

Patch attached with submission follows:
How-To-Repeat:                          |
                         |       
     +--(igb0 10.0.0.1/24)-+
     |                                          |
     |            ROUTER                |
     |                                          |
     +-(igb1 10.10.0.1/24)-+
                         |
                         |
     +-(igb0 10.10.0.2/24)-+
     |                                          |
     |                NMS                  |
     |                                          |
     +-----------------+


When the host "NMS" tries to query the host "ROUTER" on it's external address 10.0.0.1, 
the response will get from it's internal address 10.10.0.1.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-04-04 16:00:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sylvio

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Nikolay Denev 2011-04-18 04:32:19 UTC
The patch has been included upstream, and will appear in the next =
net-snmp release, so this
PR probably can be closed.=
Comment 3 Sylvio Cesar Teixeira freebsd_committer freebsd_triage 2011-05-18 13:26:28 UTC
State Changed
From-To: open->closed

This patch has been included upstream, and will appear in the nex 
net-snmp release.