[quagga-dev 4167] minor patch to ospf message

Andrew J. Schorr aschorr at telemetry-investments.com
Fri Jun 23 15:06:14 BST 2006


Hi,

Is there any objection to committing the attached patch?  The current
info message just says "ospfTrapNbrStateChange trap sent".  This
is not terribly useful: why not say which neighbor and what the new
state is?

Regards,
Andy
-------------- next part --------------
Index: ospfd/ospf_snmp.c
===================================================================
RCS file: /var/cvsroot/quagga/ospfd/ospf_snmp.c,v
retrieving revision 1.17
diff -b -u -p -r1.17 ospf_snmp.c
--- ospfd/ospf_snmp.c	6 Oct 2005 07:46:22 -0000	1.17
+++ ospfd/ospf_snmp.c	23 Jun 2006 14:03:49 -0000
@@ -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 +2557,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;


More information about the Quagga-dev mailing list