summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-06-24 20:05:02 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-06-24 20:05:02 +0000
commit9aecfae2ec82027fe1cf2740e6099397376a3f4f (patch)
treef09cfa42e421c2a34f0705f20823659d7dd1c91d
parent0ffb7094d3bd688560c37f01a05c54e35b3a1fbc (diff)
[ospfd] Improve two info log messages in ospf_snmp.c
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.
-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;