summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_snmp.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index bb65d23f..f2cdae77 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,5 +1,10 @@
2006-06-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+ * ospf_snmp.c: (ospfTrapNbrStateChange, ospfTrapIfStateChange) Improve
+ info log message to indicate why the trap is being sent.
+
+2006-06-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
* ospf_dump.c: (config_write_debug) Fix typo to show debug ospf nsm
status properly (not ism status).
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index 71cb3085..4a6cc159 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -50,6 +50,7 @@
#include "ospfd/ospf_nsm.h"
#include "ospfd/ospf_flood.h"
#include "ospfd/ospf_ism.h"
+#include "ospfd/ospf_dump.h"
/* OSPF2-MIB. */
#define OSPF2MIB 1,3,6,1,2,1,14
@@ -2565,8 +2566,11 @@ void
ospfTrapNbrStateChange (struct ospf_neighbor *on)
{
oid index[sizeof (oid) * (IN_ADDR_SIZE + 1)];
+ char msgbuf[16];
- zlog (NULL, LOG_INFO, "ospfTrapNbrStateChange trap sent");
+ ospf_nbr_state_message(on, msgbuf, sizeof(msgbuf));
+ zlog (NULL, LOG_INFO, "ospfTrapNbrStateChange trap sent: %s now %s",
+ inet_ntoa(on->address.u.prefix4), msgbuf);
oid_copy_addr (index, &(on->address.u.prefix4), IN_ADDR_SIZE);
index[IN_ADDR_SIZE] = 0;
@@ -2600,7 +2604,9 @@ ospfTrapIfStateChange (struct ospf_interface *oi)
{
oid index[sizeof (oid) * (IN_ADDR_SIZE + 1)];
- zlog (NULL, LOG_INFO, "ospfTrapIfStateChange trap sent");
+ zlog (NULL, LOG_INFO, "ospfTrapIfStateChange trap sent: %s now %s",
+ inet_ntoa(oi->address->u.prefix4),
+ LOOKUP(ospf_ism_state_msg, oi->state));
oid_copy_addr (index, &(oi->address->u.prefix4), IN_ADDR_SIZE);
index[IN_ADDR_SIZE] = 0;