]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] Add debug messages for a few zebra messages that had been overlooked
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Thu, 30 Nov 2006 16:17:02 +0000 (16:17 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Thu, 30 Nov 2006 16:17:02 +0000 (16:17 +0000)
2006-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* ospf_zebra.c: (ospf_router_id_update_zebra,
  ospf_interface_address_add, ospf_interface_address_delete)
  If (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) is enabled, then
  add a debug message about what Zebra is telling us.
  (ospf_zebra_add_discard) Add a debug message matching the one
  already in ospf_zebra_delete_discard.

ospfd/ChangeLog
ospfd/ospf_zebra.c

index 42345bdba3d476ed35bc5fdc6a36a8ace7f5340d..a0ed90951f7e058fb6f580725b1a55d4bbc79c88 100644 (file)
@@ -1,3 +1,12 @@
+2006-11-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ospf_zebra.c: (ospf_router_id_update_zebra,
+         ospf_interface_address_add, ospf_interface_address_delete)
+         If (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) is enabled, then
+         add a debug message about what Zebra is telling us.
+         (ospf_zebra_add_discard) Add a debug message matching the one
+         already in ospf_zebra_delete_discard.
+
 2006-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * ospf_vty.c: (ospf_passive_interface_default) Take additional
index aaee31e118a42442fcd953e1d65876344724fafa..bdd01424cf32faa8bbc8de30f79674bd7ec98efd 100644 (file)
@@ -65,6 +65,13 @@ ospf_router_id_update_zebra (int command, struct zclient *zclient,
   struct prefix router_id;
   zebra_router_id_update_read(zclient->ibuf,&router_id);
 
+  if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
+    {
+      char buf[128];
+      prefix2str(&router_id, buf, sizeof(buf));
+      zlog_debug("Zebra rcvd: router id update %s", buf);
+    }
+
   router_id_zebra = router_id.u.prefix4;
 
   ospf = ospf_lookup ();
@@ -256,6 +263,13 @@ ospf_interface_address_add (int command, struct zclient *zclient,
   if (c == NULL)
     return 0;
 
+  if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
+    {
+      char buf[128];
+      prefix2str(c->address, buf, sizeof(buf));
+      zlog_debug("Zebra: interface %s address add %s", c->ifp->name, buf);
+    }
+
   ospf = ospf_lookup ();
   if (ospf != NULL)
     ospf_if_update (ospf);
@@ -283,6 +297,13 @@ ospf_interface_address_delete (int command, struct zclient *zclient,
   if (c == NULL)
     return 0;
 
+  if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
+    {
+      char buf[128];
+      prefix2str(c->address, buf, sizeof(buf));
+      zlog_debug("Zebra: interface %s address delete %s", c->ifp->name, buf);
+    }
+
   ifp = c->ifp;
   p = *c->address;
   p.prefixlen = IPV4_MAX_PREFIXLEN;
@@ -470,6 +491,10 @@ ospf_zebra_add_discard (struct prefix_ipv4 *p)
       api.ifindex_num = 0;
 
       zapi_ipv4_route (ZEBRA_IPV4_ROUTE_ADD, zclient, p, &api);
+
+      if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
+        zlog_debug ("Zebra: Route add discard %s/%d",
+                   inet_ntoa (p->prefix), p->prefixlen);
     }
 }