]> git.puffer.fish Git - mirror/frr.git/commitdiff
* rt_socket.c: (kernel_rtm_ipv4) prefix_buf could be passed
authorDenis Ovsienko <linux@pilot.org.ua>
Wed, 12 Sep 2007 15:24:27 +0000 (15:24 +0000)
committerDenis Ovsienko <linux@pilot.org.ua>
Wed, 12 Sep 2007 15:24:27 +0000 (15:24 +0000)
  to zlog_err() uninitialized with debug disabled. Fixed.

zebra/ChangeLog
zebra/rt_socket.c

index 646027b93f720a75d0dd01be894f31c15c5737fa..b7c4d5ce5d4644ba83f9420ccf3826d499e7105a 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-12 Denis Ovsienko
+
+       * rt_socket.c: (kernel_rtm_ipv4) prefix_buf could be passed
+         to zlog_err() uninitialized with debug disabled. Fixed.
+
 2007-09-06 Denis Ovsienko
 
        * rtread_sysctl.c: (route_read) Set RTF_DONE on the routing
index e8668a1dd47c9306808bca535f856f781896872a..63e4612f3d9bcbdd6b4d1a6d2851daceb5e26528 100644 (file)
@@ -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;