summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-11-30 16:17:02 +0000
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>2006-11-30 16:17:02 +0000
commit7f643ebf2bca2ef446cdf4f4a3e7b16958c18069 (patch)
tree4d577a6574443cc4d6f270410bebd715e5c1e65d /ospfd
parent8d45210e7c9e221b519d975825cb83aea5ebe47e (diff)
[ospfd] Add debug messages for a few zebra messages that had been overlooked
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.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog9
-rw-r--r--ospfd/ospf_zebra.c25
2 files changed, 34 insertions, 0 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 42345bdb..a0ed9095 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -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
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index aaee31e1..bdd01424 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -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);
}
}