summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-10-22 08:07:57 -0400
committerGitHub <noreply@github.com>2020-10-22 08:07:57 -0400
commit84de5a245a3eb17619588a535b9f408ce802a8c9 (patch)
tree30eafbdeaf55a170d2bf8d7be0c1b1f34cfc4f90 /zebra/rt_socket.c
parente58496183e278767da2cb0886f90397e50cfa5ef (diff)
parent2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (diff)
Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX
:* Convert prefix2str to %pFX
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index a2e15cbd2b..a0f401c334 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -80,19 +80,15 @@ static int kernel_rtm(int cmd, const struct prefix *p,
bool gate = false;
int error;
char gate_buf[INET6_BUFSIZ];
- char prefix_buf[PREFIX_STRLEN];
enum blackhole_type bh_type = BLACKHOLE_UNSPEC;
- prefix2str(p, prefix_buf, sizeof(prefix_buf));
-
/*
* We only have the ability to ADD or DELETE at this point
* in time.
*/
if (cmd != RTM_ADD && cmd != RTM_DELETE) {
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: %s odd command %s",
- __func__, prefix_buf,
+ zlog_debug("%s: %pFX odd command %s", __func__, p,
lookup_msg(rtm_type_str, cmd, NULL));
return 0;
}
@@ -237,8 +233,8 @@ static int kernel_rtm(int cmd, const struct prefix *p,
if (IS_ZEBRA_DEBUG_KERNEL) {
if (!gate) {
zlog_debug(
- "%s: %s: attention! gate not found for re",
- __func__, prefix_buf);
+ "%s: %pFX: attention! gate not found for re",
+ __func__, p);
} else {
switch (p->family) {
case AF_INET:
@@ -266,8 +262,8 @@ static int kernel_rtm(int cmd, const struct prefix *p,
case ZEBRA_ERR_NOERROR:
nexthop_num++;
if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("%s: %s: successfully did NH %s",
- __func__, prefix_buf, gate_buf);
+ zlog_debug("%s: %pFX: successfully did NH %s",
+ __func__, p, gate_buf);
if (cmd == RTM_ADD)
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
break;
@@ -289,8 +285,8 @@ static int kernel_rtm(int cmd, const struct prefix *p,
default:
flog_err(
EC_LIB_SYSTEM_CALL,
- "%s: %s: rtm_write() unexpectedly returned %d for command %s",
- __func__, prefix_buf, error,
+ "%s: %pFX: rtm_write() unexpectedly returned %d for command %s",
+ __func__, p, error,
lookup_msg(rtm_type_str, cmd, NULL));
break;
}
@@ -300,8 +296,8 @@ static int kernel_rtm(int cmd, const struct prefix *p,
if (nexthop_num == 0) {
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
- "%s: No useful nexthops were found in RIB prefix %s",
- __func__, prefix_buf);
+ "%s: No useful nexthops were found in RIB prefix %pFX",
+ __func__, p);
return 1;
}