diff options
author | ajs <ajs> | 2006-11-30 16:17:02 +0000 |
---|---|---|
committer | ajs <ajs> | 2006-11-30 16:17:02 +0000 |
commit | 201b335058867d012c82845024787498fcd11190 (patch) | |
tree | ea90079694a6bca516b9eb79de8dd01a6f3ee874 /ospfd | |
parent | bab53b29ff8bb80389952079e5b8e27640fc0db3 (diff) | |
download | quagga-201b335058867d012c82845024787498fcd11190.tar.bz2 quagga-201b335058867d012c82845024787498fcd11190.tar.xz |
[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/ChangeLog | 9 | ||||
-rw-r--r-- | ospfd/ospf_zebra.c | 25 |
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); } } |