summaryrefslogtreecommitdiffstats
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorpilot <pilot>2007-09-12 15:24:27 +0000
committerpilot <pilot>2007-09-12 15:24:27 +0000
commitcb02334a29a30af1f04a58c9af79487629cc141f (patch)
tree55524c15bc9c0e7d3616f0bc3b13533df0e4b941 /zebra/rt_socket.c
parentd68aac0fbecabfb765a42b3c6e5693836dafda99 (diff)
downloadquagga-cb02334a29a30af1f04a58c9af79487629cc141f.tar.bz2
quagga-cb02334a29a30af1f04a58c9af79487629cc141f.tar.xz
* rt_socket.c: (kernel_rtm_ipv4) prefix_buf could be passed
to zlog_err() uninitialized with debug disabled. Fixed.
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index e8668a1d..63e4612f 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -207,6 +207,9 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family)
case ZEBRA_ERR_RTNOEXIST:
case ZEBRA_ERR_RTUNREACH:
default:
+ /* This point is reachable regardless of debugging mode. */
+ if (!IS_ZEBRA_DEBUG_RIB)
+ inet_ntop (AF_INET, &p->u.prefix, prefix_buf, INET_ADDRSTRLEN);
zlog_err ("%s: %s/%d: rtm_write() unexpectedly returned %d for command %s",
__func__, prefix_buf, p->prefixlen, error, LOOKUP (rtm_type_str, cmd));
break;