diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-18 14:33:54 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-22 09:07:41 +0300 |
| commit | 2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (patch) | |
| tree | 69c38032b07630b46d2d5852200789b13392153c /ospf6d/ospf6_zebra.c | |
| parent | 719e0a6a6c4af04d1e9f4ef4bcc1855fc35fda6c (diff) | |
:* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_zebra.c')
| -rw-r--r-- | ospf6d/ospf6_zebra.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index d37235d192..c5c8ca27b9 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -163,19 +163,13 @@ static int ospf6_zebra_read_route(ZAPI_CALLBACK_ARGS) ifindex = api.nexthops[0].ifindex; nexthop = &api.nexthops[0].gate.ipv6; - if (IS_OSPF6_DEBUG_ZEBRA(RECV)) { - char prefixstr[PREFIX2STR_BUFFER], nexthopstr[128]; - - prefix2str(&api.prefix, prefixstr, sizeof(prefixstr)); - inet_ntop(AF_INET6, nexthop, nexthopstr, sizeof(nexthopstr)); - + if (IS_OSPF6_DEBUG_ZEBRA(RECV)) zlog_debug( - "Zebra Receive route %s: %s %s nexthop %s ifindex %ld tag %" ROUTE_TAG_PRI, + "Zebra Receive route %s: %s %pFX nexthop %pI6 ifindex %ld tag %" ROUTE_TAG_PRI, (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD ? "add" : "delete"), - zebra_route_string(api.type), prefixstr, nexthopstr, + zebra_route_string(api.type), &api.prefix, nexthop, ifindex, api.tag); - } if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) ospf6_asbr_redistribute_add(api.type, ifindex, &api.prefix, @@ -219,16 +213,13 @@ DEFUN (show_zebra, static void ospf6_zebra_route_update(int type, struct ospf6_route *request) { struct zapi_route api; - char buf[PREFIX2STR_BUFFER]; int nhcount; int ret = 0; struct prefix *dest; - if (IS_OSPF6_DEBUG_ZEBRA(SEND)) { - prefix2str(&request->prefix, buf, sizeof(buf)); - zlog_debug("Send %s route: %s", - (type == REM ? "remove" : "add"), buf); - } + if (IS_OSPF6_DEBUG_ZEBRA(SEND)) + zlog_debug("Send %s route: %pFX", + (type == REM ? "remove" : "add"), &request->prefix); if (zclient->sock < 0) { if (IS_OSPF6_DEBUG_ZEBRA(SEND)) |
