[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-patches
Subject:    [Net-snmp-patches] [ net-snmp-Patches-627697 ] Send UDP replies from correct IP address
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2003-02-20 5:46:07
[Download RAW message or body]

Patches item #627697, was opened at 2002-10-23 13:04
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=627697&group_id=12694

Category: None
Group: None
> Status: Closed
> Resolution: Duplicate
Priority: 5
Submitted By: Joel Rosdahl (jrosdahl)
> Assigned to: John Naylon (jbpn)
Summary: Send UDP replies from correct IP address

Initial Comment:
Currently, snmpd uses an INADDR_ANY UDP socket to 
send replies from. On a host with multiple IP addresses, 
the reply may be sent from another IP address than the 
address that the client sent the request to, which is 
confusing. This patch solves the problem by setting up 
one UDP socket for each interface (which also is how 
BIND does it).

Sorry about the #ifdef WIN32 (etc)... I'm not able to 
develop and test the corresponding WIN32 code.

The patch is against a hopefully current CVS version.


----------------------------------------------------------------------

Comment By: John Naylon (jbpn)
Date: 2002-12-19 04:55

Message:
Logged In: YES 
user_id=93926

Hi -- I've just uploaded a very similar (independently
developed) patch as an official patch against 5.0.7-pre1. 
One slight difference is that this one opens an INADDR_ANY
socket as well in order to catch packets on interfaces
brought up while snmpd is running.  I would be very grateful
for any feedback you could provide.

John

----------------------------------------------------------------------

Comment By: Joel Rosdahl (jrosdahl)
Date: 2002-12-10 05:20

Message:
Logged In: YES 
user_id=58503

I have attached a revised version of the patch. Fixes:

* Removed bad free().

* Do SIOCGIFFLAGS ioctl on a copy of the result from SIOCGIFCONF, since the former \
call seems to mess up the result of the latter on some platforms.

* Removed ioctl SIOCGIFADDR call, since it makes things bad on at least BSD/OS 4.2

* Include proper headers for inet_ntoa(). Fixed parameter type in call to \
inet_ntoa().


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=627697&group_id=12694


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Net-snmp-patches mailing list
Net-snmp-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-patches


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic