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

List:       net-snmp-patches
Subject:    [Net-snmp-patches] [ net-snmp-Patches-1620424 ] 5.4
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2007-06-19 6:39:56
Message-ID: E1I0XNc-00014e-QD () sc8-sf-web24 ! sourceforge ! net
[Download RAW message or body]

Patches item #1620424, was opened at 2006-12-21 22:25
Message generated for change (Comment added) made by magfr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1620424&group_id=12694

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Resolution: Accepted
Priority: 7
Private: No
Submitted By: Magnus Fromreide (magfr)
Assigned to: Magnus Fromreide (magfr)
Summary: 5.4 snmptrap/trapsess send notifications to port 161

Initial Comment:
snmptrap from net-snmp 5.4 and 5.5.dev defaults to sending traps on port 161.

Example:

% snmptrap -d -v2c -c public localhost 1024 1.2.3.4

Sending 64 bytes to UDP: [127.0.0.1]:161
...


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

>Comment By: Magnus Fromreide (magfr)
Date: 2007-06-19 08:39

Message:
Logged In: YES 
user_id=1124910
Originator: YES

This patch is applied to the 5.4.x and main development branches, so it is
apart of all 5.4.1 prereleases and anything later than that on the 5.4
branch.
It is also part of the trunk.

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

Comment By: zhoujcius (zhoujcius)
Date: 2007-06-19 07:20

Message:
Logged In: YES 
user_id=1815997
Originator: NO

Hello, this is a newer too. May anybody tell me where I can find the
patch? Thanks a lot

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-05-18 00:17

Message:
Logged In: YES 
user_id=1124910
Originator: YES

Thanks for the patch!  It has been applied to the 5.4.x
code branch and the main development tree, and will
appear in future releases of the Net-SNMP package.

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-03-09 06:18

Message:
Logged In: YES 
user_id=1124910
Originator: YES

Found out that the trapsess directive also contained the bug.
Thanks to Ricardo Marin Vinuesa for the test case.

Updated the patch to handle that case as well.

Description of changes from the previous version:

agent/agent_trap.c
Use snmp_add instead of snmp_open in order to get the right application
type.
File Added: patch

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

Comment By: Thomas Anders (tanders)
Date: 2007-02-16 00:51

Message:
Logged In: YES 
user_id=848638
Originator: NO

Thanks. I didn't know you were working on a new patch. Moving back to
patches tracker ...

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-02-15 22:43

Message:
Logged In: YES 
user_id=1124910
Originator: YES

The patch depends on patch #1653670, if that one isn't added as well this
fix won't correct the problem properly.

Description of the changes:

apps/snmptrap.c:
Do not depend on NETSNMP_DS_LIB_DEFAULT_PORT for setting of the port that
should be used, use snmp_add and netsnmp_transport_open_client to open a
transport using the right application instead.

apps/snmptrapd.c:
Do not assume that every transport uses :162 for trap reception, instead
use the unmodified user input as argument to
netsnmp_transport_open_server.

snmplib/snmpUDPDomain.c:
snmplib/snmpUDPIPv6Domain.c:
Change the priority of targets so that NETSNMP_DS_LIB_DEFAULT_PORT is
better than the default target from the application lookup.

snmplib/snmp_api.c:
Remove the setting of NETSNMP_DS_LIB_DEFAULT_PORT in _init_snmp as it
isn't needed any more and, given the priority change, would render the
default target  from application lookup useless.
File Added: diff

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

Comment By: Thomas Anders (tanders)
Date: 2007-02-13 15:39

Message:
Logged In: YES 
user_id=848638
Originator: NO

moving back to bug tracker since patch has been withdrawn

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-02-06 23:40

Message:
Logged In: YES 
user_id=1124910
Originator: YES

Removed the patch as it was broken

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-01-22 01:01

Message:
Logged In: YES 
user_id=1124910
Originator: YES

I use the command

patch -p0 < /tmp/patch

to apply the patch

Further I have found that the patch contained a minor error so I have
uploaded a new version (the old one had an unrelated change to
agent/agent_trap.c that removed an unused variable).

Oh yes, tanders, this bug doesn't affect trapsess configs since that
doesn't use the DS_LIB_DEFAULT_PORT mechanism to select the port.
File Added: change

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

Comment By: bertu123 (bertubezz)
Date: 2007-01-19 15:39

Message:
Logged In: YES 
user_id=1696238
Originator: NO

Hi sorry I am new!! Can you pls tell me how to install this patch?

Thanks a lot

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

Comment By: Thomas Anders (tanders)
Date: 2007-01-06 14:43

Message:
Logged In: YES 
user_id=848638
Originator: NO

moving to patches.

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

Comment By: Thomas Anders (tanders)
Date: 2007-01-02 14:35

Message:
Logged In: YES 
user_id=848638
Originator: NO

For completeness, the problem is believed to also affect "trapsess"
configs and the like.

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

Comment By: Magnus Fromreide (magfr)
Date: 2007-01-01 16:18

Message:
Logged In: YES 
user_id=1124910
Originator: YES

I have noticed that the a and b patch together didn't produce the right
result as I had managed to misapply one of them. The attached patch is a
combintion of them that also solves the misapplied chunk.
File Added: patch

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

Comment By: Magnus Fromreide (magfr)
Date: 2006-12-21 23:22

Message:
Logged In: YES 
user_id=1124910
Originator: YES

The problem with patch a is that snmptrap -d -v2c -c public
--defTarget='snmptrap udp :55555' localhost 1024 1.2.3.4 still sends on
port 162 and not on 55555 as expected.

This is due to problem a) and the following patch solves it but is not in
and by itself enough to solve the original problem - both patches are
needed for that!
File Added: b

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

Comment By: Magnus Fromreide (magfr)
Date: 2006-12-21 22:46

Message:
Logged In: YES 
user_id=1124910
Originator: YES

This patch is enough to solve the symptom and problem b) but problem a)
still remains.
File Added: a

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

Comment By: Magnus Fromreide (magfr)
Date: 2006-12-21 22:36

Message:
Logged In: YES 
user_id=1124910
Originator: YES

The problems here is that
a) snmp_open assumes that the transport domain should be "snmp" while
"snmptrap"
   is correct for trap sending
b) NETSNMP_DS_LIB_DEFAULT_PORT is given lower priority than the result
from the
   domain lookup


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

Comment By: Magnus Fromreide (magfr)
Date: 2006-12-21 22:26

Message:
Logged In: YES 
user_id=1124910
Originator: YES

This bug report is originally from G. S. Marzot.

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

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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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