The ideal solution would be one where a probe would not be sent for
traps sessions, the probe will be sent only if it is a session for
Informs.
I see 2 possible solutions:
---------------------------------------
1) get_target_sessions() should be passed the snmpNotifyType parameter,
and propagate it all the way to _sess_async_send().
_sess_async_send() will then probe or use local engineID
accordingly.
2) Remove the automatic probing from snmp_sess_add_ex(),
and add probing in send_notifications() in case the snmpNotifyType
is SNMPNOTIFYTYPE_INFORM.
Question:
-------------
Whic way do you thing is prefferable?
P.S:
--------
I didn't really understand what you ment here:
********************
"I'm kind of thinking that get_target_sessions ought to create one
session per tag after all if it's going to use the cached engine ID in
this way, because even if you skip probing at creation until you know
you're going to send an inform to the target, the target could actually
have been configured to send both a trap and an inform (by listing two
snmpNotifyTag values - one for each)."
**********************
Thanks,
Erez.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Michael Kirkham
Sent: Tuesday, January 23, 2007 1:16 PM
To: [email protected]
Subject: Re: Failed sending V3 traps with auth using snmpNotifyTable
Having been digging for bugs in the target/notification/filter table
mechanisms, I can confirm this.
When it's time to send notifications to targets registered via the MIB
tables, the agent calls send_notifications (snmpNotifyTagble.c).
send_notifications calls get_target_sessions (target.c) to get (and
create, if not yet done) sessions for targets matching snmpNotifyTag
values.
get_target_sessions calls snmp_add (snmp_api.c).
snmp_add calls snmp_sess_add_ex (snmp_api.c).
snmp_sess_add_ex automatically probes if the session version is SNMPv3,
though it's not determined yet what kind of notification will be sent.
send_notifications calls send_trap_to_sess (agent_trap.c).
send_trap_to_sess calls snmp_send and finds its way to _sess_async_send
(snmp_api.c).
_sess_async_send doesn't do anything about the session's engine ID
because no response is expected.
Looks like it winds up in snmpv3_build (snmp_api.c) from there, which
just uses the Engine ID from the session.
I'm kind of thinking that get_target_sessions ought to create one
session per tag after all if it's going to use the cached engine ID in
this way, because even if you skip probing at creation until you know
you're going to send an inform to the target, the target could actually
have been configured to send both a trap and an inform (by listing two
snmpNotifyTag values - one for each).
Otherwise, perhaps send_trap_to_sess ought to figure out which to use
based on notification type, or something. Maybe a session flag set in
get_target_sessions that tells it to?
> The patch you sent me is about a problem with using the config file
> directive 'trapsess', I'm not using that, I'm using the snmpTargetMIB
> and snmpNotificationMIB to send traps.
>
> Erez.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave
> Shield
> Sent: Friday, January 19, 2007 11:33 AM
> To: Makavy, Erez (Erez)
> Cc: [EMAIL PROTECTED]
> Subject: Re: Failed sending V3 traps with auth using snmpNotifyTable
>
> On 18/01/07, Makavy, Erez (Erez) <[EMAIL PROTECTED]> wrote:
> > When I define a trap manager assigned with a local-user (user which
> > has the engine id of the local agent, not the engine id of the
> > management station), I can not send out notifications with
> > authentication (without authentication works fine).
>
> Known problem - fixed in 5.4 and the current CVS code for earlier
> branches.
>
>
> > Could you point me to the propper place in the code to fix it.
>
> See the attached patch
>
> Dave
--
Michael Kirkham
President & CEO
Muonics, Inc.
http://www.muonics.com/
------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users