mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
[ospfd] Fix two debug messages that used inet_ntoa more than once
2007-03-14 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospf_zebra.c: (ospf_zebra_add, ospf_zebra_delete) Fix bug where inet_ntoa was used twice in the same debug message, which doesn't work because there's a single shared buffer for the returned string. The fix is to use inet_ntop.
This commit is contained in:
parent
c136d24406
commit
56b3ea09bb
@ -1,3 +1,10 @@
|
|||||||
|
2007-03-14 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
|
* ospf_zebra.c: (ospf_zebra_add, ospf_zebra_delete) Fix bug
|
||||||
|
where inet_ntoa was used twice in the same debug message,
|
||||||
|
which doesn't work because there's a single shared buffer
|
||||||
|
for the returned string. The fix is to use inet_ntop.
|
||||||
|
|
||||||
2007-02-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
2007-02-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
* ospfd.c: (ospf_terminate) Exit immediately if ospf is not
|
* ospfd.c: (ospf_terminate) Exit immediately if ospf is not
|
||||||
|
@ -396,9 +396,13 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
|
|||||||
|
|
||||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE))
|
||||||
{
|
{
|
||||||
zlog_debug ("Zebra: Route add %s/%d nexthop %s",
|
char buf[2][INET_ADDRSTRLEN];
|
||||||
inet_ntoa (p->prefix),
|
zlog_debug("Zebra: Route add %s/%d nexthop %s",
|
||||||
p->prefixlen, inet_ntoa (path->nexthop));
|
inet_ntop(AF_INET, &p->prefix,
|
||||||
|
buf[0], sizeof(buf[0])),
|
||||||
|
p->prefixlen,
|
||||||
|
inet_ntop(AF_INET, &path->nexthop,
|
||||||
|
buf[1], sizeof(buf[1])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,9 +466,12 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
|
|||||||
|
|
||||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE) && api.nexthop_num)
|
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE) && api.nexthop_num)
|
||||||
{
|
{
|
||||||
zlog_debug ("Zebra: Route delete %s/%d nexthop %s",
|
char buf[2][INET_ADDRSTRLEN];
|
||||||
inet_ntoa (p->prefix),
|
zlog_debug("Zebra: Route delete %s/%d nexthop %s",
|
||||||
p->prefixlen, inet_ntoa (**api.nexthop));
|
inet_ntop(AF_INET, &p->prefix, buf[0], sizeof(buf[0])),
|
||||||
|
p->prefixlen,
|
||||||
|
inet_ntop(AF_INET, *api.nexthop,
|
||||||
|
buf[1], sizeof(buf[1])));
|
||||||
}
|
}
|
||||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE) && api.ifindex_num)
|
if (IS_DEBUG_OSPF (zebra, ZEBRA_REDISTRIBUTE) && api.ifindex_num)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user