diff --git a/zebra/interface.c b/zebra/interface.c
index 54d8b10..80eb6aa 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1593,10 +1593,9 @@
 	      {
 		char buf[INET6_ADDRSTRLEN];
 		p = ifc->address;
-		vty_out (vty, " ip%s address %s/%d",
+		vty_out (vty, " ip%s address %s",
 			 p->family == AF_INET ? "" : "v6",
-			 inet_ntop (p->family, &p->u.prefix, buf, sizeof(buf)),
-			 p->prefixlen);
+			 prefix2str (p, buf, sizeof(buf)));
 
 		if (ifc->label)
 		  vty_out (vty, " label %s", ifc->label);
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 6c1c254..16934f0 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -407,11 +407,11 @@
 int
 if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc)
 {
-  char addrbuf[INET_ADDRSTRLEN];
+  char addrbuf[PREFIX_STRLEN];
 
-  inet_ntop (AF_INET6, &(((struct prefix_ipv6 *) (ifc->address))->prefix),
-             addrbuf, sizeof (addrbuf));
-  zlog_warn ("Can't set %s on interface %s", addrbuf, ifp->name);
+  zlog_warn ("Can't set %s on interface %s",
+             prefix2str(ifc->address->prefix, addrbuf, sizeof(addrbuf)),
+             ifp->name);
 
   return 0;
 
@@ -420,11 +420,11 @@
 int
 if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc)
 {
-  char addrbuf[INET_ADDRSTRLEN];
+  char addrbuf[PREFIX_STRLEN];
 
-  inet_ntop (AF_INET6, &(((struct prefix_ipv6 *) (ifc->address))->prefix),
-             addrbuf, sizeof (addrbuf));
-  zlog_warn ("Can't delete %s on interface %s", addrbuf, ifp->name);
+  zlog_warn ("Can't delete %s on interface %s",
+             prefix2str(ifc->address->prefix, addrbuf, sizeof(addrbuf)),
+             ifp->name);
 
   return 0;
 
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index c297979..cf78a54 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -180,6 +180,7 @@
 {
   struct zebra_if *zi=ifp->info;
   struct irdp_interface *irdp=&zi->irdp;
+  char buf[PREFIX_STRLEN];
   u_int32_t dst;
   u_int32_t ttl=1;
 
@@ -191,10 +192,9 @@
     dst = htonl(INADDR_ALLHOSTS_GROUP);
 
   if(irdp->flags & IF_DEBUG_MESSAGES) 
-    zlog_debug("IRDP: TX Advert on %s %s/%d Holdtime=%d Preference=%d", 
+    zlog_debug("IRDP: TX Advert on %s %s Holdtime=%d Preference=%d",
 	      ifp->name,
-	      inet_ntoa(p->u.prefix4), 
-	      p->prefixlen,
+	      prefix2str(p, buf, sizeof buf),
 	      irdp->flags & IF_SHUTDOWN? 0 : irdp->Lifetime,
 	      get_pref(irdp, p));
 
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 916dad9..fefccdc 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -631,50 +631,32 @@
 
   if (IS_ZEBRA_DEBUG_KERNEL)
     {
-      switch (sockunion_family(addr))
+      int family = sockunion_family(addr);
+      switch (family)
         {
 	case AF_INET:
+#ifdef HAVE_IPV6
+	case AF_INET6:
+#endif
 	  {
-	    char buf[4][INET_ADDRSTRLEN];
+	    char buf[4][INET6_ADDRSTRLEN];
 	    zlog_debug ("%s: ifindex %d, ifname %s, ifam_addrs 0x%x, "
 			"ifam_flags 0x%x, addr %s/%d broad %s dst %s "
 			"gateway %s",
 			__func__, ifm->ifam_index,
 			(ifnlen ? ifname : "(nil)"), ifm->ifam_addrs,
 			ifm->ifam_flags,
-			inet_ntop(AF_INET,&addr->sin.sin_addr,
+			inet_ntop(family,&addr->sin.sin_addr,
 			          buf[0],sizeof(buf[0])),
 			ip_masklen(mask->sin.sin_addr),
-			inet_ntop(AF_INET,&brd->sin.sin_addr,
+			inet_ntop(family,&brd->sin.sin_addr,
 			          buf[1],sizeof(buf[1])),
-			inet_ntop(AF_INET,&dst.sin.sin_addr,
+			inet_ntop(family,&dst.sin.sin_addr,
 			          buf[2],sizeof(buf[2])),
-			inet_ntop(AF_INET,&gateway.sin.sin_addr,
+			inet_ntop(family,&gateway.sin.sin_addr,
 			          buf[3],sizeof(buf[3])));
 	  }
 	  break;
-#ifdef HAVE_IPV6
-	case AF_INET6:
-	  {
-	    char buf[4][INET6_ADDRSTRLEN];
-	    zlog_debug ("%s: ifindex %d, ifname %s, ifam_addrs 0x%x, "
-			"ifam_flags 0x%x, addr %s/%d broad %s dst %s "
-			"gateway %s",
-			__func__, ifm->ifam_index, 
-			(ifnlen ? ifname : "(nil)"), ifm->ifam_addrs,
-			ifm->ifam_flags,
-			inet_ntop(AF_INET6,&addr->sin6.sin6_addr,
-			          buf[0],sizeof(buf[0])),
-			ip6_masklen(mask->sin6.sin6_addr),
-			inet_ntop(AF_INET6,&brd->sin6.sin6_addr,
-			          buf[1],sizeof(buf[1])),
-			inet_ntop(AF_INET6,&dst.sin6.sin6_addr,
-			          buf[2],sizeof(buf[2])),
-			inet_ntop(AF_INET6,&gateway.sin6.sin6_addr,
-			          buf[3],sizeof(buf[3])));
-	  }
-	  break;
-#endif /* HAVE_IPV6 */
         default:
 	  zlog_debug ("%s: ifindex %d, ifname %s, ifam_addrs 0x%x",
 		      __func__, ifm->ifam_index, 
@@ -904,12 +886,12 @@
        */
       if (rtm->rtm_type != RTM_GET && rtm->rtm_pid == pid)
       {
-        char buf[INET_ADDRSTRLEN], gate_buf[INET_ADDRSTRLEN];
+        char buf[PREFIX_STRLEN], gate_buf[INET_ADDRSTRLEN];
         int ret;
         if (! IS_ZEBRA_DEBUG_RIB)
           return;
         ret = rib_lookup_ipv4_route (&p, &gate); 
-        inet_ntop (AF_INET, &p.prefix, buf, INET_ADDRSTRLEN);
+        prefix2str (&p, buf, sizeof(buf));
         switch (rtm->rtm_type)
         {
           case RTM_ADD:
@@ -920,18 +902,18 @@
             switch (ret)
             {
               case ZEBRA_RIB_NOTFOUND:
-                zlog_debug ("%s: %s %s/%d: desync: RR isn't yet in RIB, while already in FIB",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen);
+                zlog_debug ("%s: %s %s: desync: RR isn't yet in RIB, while already in FIB",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf);
                 break;
               case ZEBRA_RIB_FOUND_CONNECTED:
               case ZEBRA_RIB_FOUND_NOGATE:
                 inet_ntop (AF_INET, &gate.sin.sin_addr, gate_buf, INET_ADDRSTRLEN);
-                zlog_debug ("%s: %s %s/%d: desync: RR is in RIB, but gate differs (ours is %s)",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen, gate_buf);
+                zlog_debug ("%s: %s %s: desync: RR is in RIB, but gate differs (ours is %s)",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, gate_buf);
                 break;
               case ZEBRA_RIB_FOUND_EXACT: /* RIB RR == FIB RR */
-                zlog_debug ("%s: %s %s/%d: done Ok",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen);
+                zlog_debug ("%s: %s %s: done Ok",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf);
                 rib_lookup_and_dump (&p);
                 return;
                 break;
@@ -943,27 +925,27 @@
             switch (ret)
             {
               case ZEBRA_RIB_FOUND_EXACT:
-                zlog_debug ("%s: %s %s/%d: desync: RR is still in RIB, while already not in FIB",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen);
+                zlog_debug ("%s: %s %s: desync: RR is still in RIB, while already not in FIB",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf);
                 rib_lookup_and_dump (&p);
                 break;
               case ZEBRA_RIB_FOUND_CONNECTED:
               case ZEBRA_RIB_FOUND_NOGATE:
-                zlog_debug ("%s: %s %s/%d: desync: RR is still in RIB, plus gate differs",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen);
+                zlog_debug ("%s: %s %s: desync: RR is still in RIB, plus gate differs",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf);
                 rib_lookup_and_dump (&p);
                 break;
               case ZEBRA_RIB_NOTFOUND: /* RIB RR == FIB RR */
-                zlog_debug ("%s: %s %s/%d: done Ok",
-                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf, p.prefixlen);
+                zlog_debug ("%s: %s %s: done Ok",
+                  __func__, lookup (rtm_type_str, rtm->rtm_type), buf);
                 rib_lookup_and_dump (&p);
                 return;
                 break;
             }
             break;
           default:
-            zlog_debug ("%s: %s/%d: warning: loopback RTM of type %s received",
-              __func__, buf, p.prefixlen, lookup (rtm_type_str, rtm->rtm_type));
+            zlog_debug ("%s: %s: warning: loopback RTM of type %s received",
+              __func__, buf, lookup (rtm_type_str, rtm->rtm_type));
         }
         return;
       }
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 8d5b4ca..94330ae 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -326,12 +326,12 @@
 
   if (IS_ZEBRA_DEBUG_EVENT)
     {
-      char buf[INET6_ADDRSTRLEN];
+      char buf[PREFIX_STRLEN];
 
       p = ifc->address;
-      zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s/%d on %s",
-		  inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
-		  p->prefixlen, ifc->ifp->name);
+      zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_ADD %s on %s",
+		  prefix2str (p, buf, sizeof(buf)),
+		  ifc->ifp->name);
     }
 
   if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
@@ -355,12 +355,12 @@
 
   if (IS_ZEBRA_DEBUG_EVENT)
     {
-      char buf[INET6_ADDRSTRLEN];
+      char buf[PREFIX_STRLEN];
 
       p = ifc->address;
-      zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s/%d on %s",
-		  inet_ntop (p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN),
-		 p->prefixlen, ifc->ifp->name);
+      zlog_debug ("MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE %s on %s",
+		  prefix2str (p, buf, sizeof(buf)),
+		  ifc->ifp->name);
     }
 
   router_id_del_address(ifc);
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 7e41072..45ebf20 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -933,12 +933,10 @@
 
       if (IS_ZEBRA_DEBUG_KERNEL)
         {
-          if (h->nlmsg_type == RTM_NEWROUTE)
-            zlog_debug ("RTM_NEWROUTE %s/%d",
-                       inet_ntoa (p.prefix), p.prefixlen);
-          else
-            zlog_debug ("RTM_DELROUTE %s/%d",
-                       inet_ntoa (p.prefix), p.prefixlen);
+          char buf[PREFIX_STRLEN];
+          zlog_debug ("%s %s",
+                      h->nlmsg_type == RTM_NEWROUTE ? "RTM_NEWROUTE" : "RTM_DELROUTE",
+                      prefix2str (&p, buf, sizeof(buf)));
         }
 
       if (h->nlmsg_type == RTM_NEWROUTE)
@@ -1010,7 +1008,6 @@
   if (rtm->rtm_family == AF_INET6)
     {
       struct prefix_ipv6 p;
-      char buf[BUFSIZ];
 
       p.family = AF_INET6;
       memcpy (&p.prefix, dest, 16);
@@ -1018,14 +1015,10 @@
 
       if (IS_ZEBRA_DEBUG_KERNEL)
         {
-          if (h->nlmsg_type == RTM_NEWROUTE)
-            zlog_debug ("RTM_NEWROUTE %s/%d",
-                       inet_ntop (AF_INET6, &p.prefix, buf, BUFSIZ),
-                       p.prefixlen);
-          else
-            zlog_debug ("RTM_DELROUTE %s/%d",
-                       inet_ntop (AF_INET6, &p.prefix, buf, BUFSIZ),
-                       p.prefixlen);
+          char buf[PREFIX_STRLEN];
+          zlog_debug ("%s %s",
+                      h->nlmsg_type == RTM_NEWROUTE ? "RTM_NEWROUTE" : "RTM_DELROUTE",
+                      prefix2str (&p, buf, sizeof(buf)));
         }
 
       if (h->nlmsg_type == RTM_NEWROUTE)
@@ -1563,16 +1556,12 @@
 {
   if (IS_ZEBRA_DEBUG_KERNEL)
     {
-      zlog_debug ("netlink_route_multipath() (%s): %s %s/%d type %s",
+      char buf[PREFIX_STRLEN];
+      zlog_debug ("netlink_route_multipath() (%s): %s %s type %s",
          routedesc,
          lookup (nlmsg_str, cmd),
-#ifdef HAVE_IPV6
-         (family == AF_INET) ? inet_ntoa (p->u.prefix4) :
-         inet6_ntoa (p->u.prefix6),
-#else
-         inet_ntoa (p->u.prefix4),
-#endif /* HAVE_IPV6 */
-         p->prefixlen, nexthop_type_to_str (nexthop->type));
+         prefix2str (p, buf, sizeof(buf)),
+         nexthop_type_to_str (nexthop->type));
     }
 }
 
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index d8c947c..bf21ca9 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -77,10 +77,10 @@
   unsigned int ifindex = 0;
   int gate = 0;
   int error;
-  char prefix_buf[INET_ADDRSTRLEN];
+  char prefix_buf[PREFIX_STRLEN];
 
   if (IS_ZEBRA_DEBUG_RIB)
-    inet_ntop (AF_INET, &p->u.prefix, prefix_buf, INET_ADDRSTRLEN);
+    prefix2str (p, prefix_buf, sizeof(prefix_buf));
   memset (&sin_dest, 0, sizeof (struct sockaddr_in));
   sin_dest.sin_family = AF_INET;
 #ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
@@ -158,8 +158,8 @@
            {
              if (!gate)
              {
-               zlog_debug ("%s: %s/%d: attention! gate not found for rib %p",
-                 __func__, prefix_buf, p->prefixlen, rib);
+               zlog_debug ("%s: %s: attention! gate not found for rib %p",
+                 __func__, prefix_buf, rib);
                rib_dump (p, rib);
              }
              else
@@ -172,8 +172,8 @@
              case ZEBRA_ERR_NOERROR:
                nexthop_num++;
                if (IS_ZEBRA_DEBUG_RIB)
-                 zlog_debug ("%s: %s/%d: successfully did NH %s",
-                   __func__, prefix_buf, p->prefixlen, gate_buf);
+                 zlog_debug ("%s: %s: successfully did NH %s",
+                   __func__, prefix_buf, gate_buf);
                if (cmd == RTM_ADD)
                  SET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB);
                break;
@@ -195,11 +195,9 @@
              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));
+               zlog_err ("%s: %s: rtm_write() unexpectedly returned %d for command %s",
+                 __func__, prefix2str(p, prefix_buf, sizeof(prefix_buf)),
+                 error, lookup (rtm_type_str, cmd));
                break;
            }
          } /* if (cmd and flags make sense) */
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 9a3fd26..b395982 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -1537,7 +1537,7 @@
   struct zebra_if *zif;
   struct listnode *node;
   struct rtadv_prefix *rprefix;
-  u_char buf[INET6_ADDRSTRLEN];
+  char buf[PREFIX_STRLEN];
   int interval;
 
   if (! rtadv)
@@ -1601,10 +1601,8 @@
 
   for (ALL_LIST_ELEMENTS_RO (zif->rtadv.AdvPrefixList, node, rprefix))
     {
-      vty_out (vty, " ipv6 nd prefix %s/%d",
-	       inet_ntop (AF_INET6, &rprefix->prefix.prefix,
-			  (char *) buf, INET6_ADDRSTRLEN),
-	       rprefix->prefix.prefixlen);
+      vty_out (vty, " ipv6 nd prefix %s",
+               prefix2str (&rprefix->prefix, buf, sizeof(buf)));
       if ((rprefix->AdvValidLifetime != RTADV_VALID_LIFETIME) || 
 	  (rprefix->AdvPreferredLifetime != RTADV_PREFERRED_LIFETIME))
 	{
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index e02d174..896915c 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1301,7 +1301,7 @@
 zfpm_trigger_update (struct route_node *rn, const char *reason)
 {
   rib_dest_t *dest;
-  char buf[INET6_ADDRSTRLEN];
+  char buf[PREFIX_STRLEN];
 
   /*
    * Ignore if the connection is down. We will update the FPM about
@@ -1329,9 +1329,8 @@
 
   if (reason)
     {
-      zfpm_debug ("%s/%d triggering update to FPM - Reason: %s",
-		  inet_ntop (rn->p.family, &rn->p.u.prefix, buf, sizeof (buf)),
-		  rn->p.prefixlen, reason);
+      zfpm_debug ("%s triggering update to FPM - Reason: %s",
+		  prefix2str (&rn->p, buf, sizeof(buf)), reason);
     }
 
   SET_FLAG (dest->flags, RIB_DEST_UPDATE_FPM);
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index cc7f48f..f247f1d 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -82,7 +82,7 @@
 _rnode_zlog(const char *_func, struct route_node *rn, int priority,
 	    const char *msgfmt, ...)
 {
-  char buf[INET6_ADDRSTRLEN + 4], *bptr;
+  char buf[PREFIX_STRLEN + 8];
   char msgbuf[512];
   va_list ap;
 
@@ -94,10 +94,9 @@
     {
       rib_table_info_t *info = rn->table->info;
 
-      inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
-      bptr = buf + strlen(buf);
-      snprintf(bptr, buf + sizeof(buf) - bptr, "/%d%s", rn->p.prefixlen,
-               info->safi == SAFI_MULTICAST ? " (MRIB)" : "");
+      prefix2str(&rn->p, buf, sizeof(buf));
+      if (info->safi == SAFI_MULTICAST)
+        strcat(buf, " (MRIB)");
     }
   else
     {
@@ -2010,13 +2009,12 @@
 		union prefix46constptr pp, const struct rib * rib)
 {
   const struct prefix *p = pp.p;
-  char straddr[INET6_ADDRSTRLEN];
+  char straddr[PREFIX_STRLEN];
   struct nexthop *nexthop, *tnexthop;
   int recursing;
 
-  inet_ntop (p->family, &p->u.prefix, straddr, INET6_ADDRSTRLEN);
-  zlog_debug ("%s: dumping RIB entry %p for %s/%d", func, (void *)rib,
-              straddr, p->prefixlen);
+  zlog_debug ("%s: dumping RIB entry %p for %s", func, (void *)rib,
+              prefix2str(p, straddr, sizeof(straddr)));
   zlog_debug
   (
     "%s: refcnt == %lu, uptime == %lu, type == %u, table == %d",
@@ -2080,14 +2078,14 @@
     return;
   }
 
-  inet_ntop (AF_INET, &p->prefix.s_addr, prefix_buf, INET_ADDRSTRLEN);
   /* Scan the RIB table for exactly matching RIB entry. */
   rn = route_node_lookup (table, (struct prefix *) p);
 
   /* No route for this prefix. */
   if (! rn)
   {
-    zlog_debug ("%s: lookup failed for %s/%d", __func__, prefix_buf, p->prefixlen);
+    zlog_debug ("%s: lookup failed for %s", __func__,
+                prefix2str((struct prefix*) p, prefix_buf, sizeof(prefix_buf)));
     return;
   }
 
@@ -2150,9 +2148,9 @@
       changed = 1;
       if (IS_ZEBRA_DEBUG_RIB)
       {
-        char buf[INET_ADDRSTRLEN];
-        inet_ntop (rn->p.family, &p->prefix, buf, INET_ADDRSTRLEN);
-        zlog_debug ("%s: freeing way for connected prefix %s/%d", __func__, buf, p->prefixlen);
+        char buf[PREFIX_STRLEN];
+        zlog_debug ("%s: freeing way for connected prefix %s", __func__,
+                    prefix2str(&rn->p, buf, sizeof(buf)));
         rib_dump (&rn->p, rib);
       }
       rib_uninstall (rn, rib);
@@ -2246,7 +2244,7 @@
   struct rib *same = NULL;
   struct nexthop *nexthop, *tnexthop;
   int recursing;
-  char buf1[INET_ADDRSTRLEN];
+  char buf1[PREFIX_STRLEN];
   char buf2[INET_ADDRSTRLEN];
 
   /* Lookup table.  */
@@ -2260,15 +2258,13 @@
   if (IS_ZEBRA_DEBUG_KERNEL)
     {
       if (gate)
-	zlog_debug ("rib_delete_ipv4(): route delete %s/%d via %s ifindex %d",
-		    inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-		    p->prefixlen,
+	zlog_debug ("rib_delete_ipv4(): route delete %s via %s ifindex %d",
+		    prefix2str (p, buf1, sizeof(buf1)),
 		    inet_ntoa (*gate),
 		    ifindex);
       else
-	zlog_debug ("rib_delete_ipv4(): route delete %s/%d ifindex %d",
-		    inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-		    p->prefixlen,
+	zlog_debug ("rib_delete_ipv4(): route delete %s ifindex %d",
+		    prefix2str (p, buf1, sizeof(buf1)),
 		    ifindex);
     }
 
@@ -2279,15 +2275,13 @@
       if (IS_ZEBRA_DEBUG_KERNEL)
 	{
 	  if (gate)
-	    zlog_debug ("route %s/%d via %s ifindex %d doesn't exist in rib",
-		       inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-		       p->prefixlen,
+	    zlog_debug ("route %s via %s ifindex %d doesn't exist in rib",
+		       prefix2str (p, buf1, sizeof(buf1)),
 		       inet_ntop (AF_INET, gate, buf2, INET_ADDRSTRLEN),
 		       ifindex);
 	  else
-	    zlog_debug ("route %s/%d ifindex %d doesn't exist in rib",
-		       inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-		       p->prefixlen,
+	    zlog_debug ("route %s ifindex %d doesn't exist in rib",
+		       prefix2str (p, buf1, sizeof(buf1)),
 		       ifindex);
 	}
       return ZEBRA_ERR_RTNOEXIST;
@@ -2354,16 +2348,14 @@
 	  if (IS_ZEBRA_DEBUG_KERNEL)
 	    {
 	      if (gate)
-		zlog_debug ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
-			   inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-			   p->prefixlen,
+		zlog_debug ("route %s via %s ifindex %d type %d doesn't exist in rib",
+			   prefix2str (p, buf1, sizeof(buf1)),
 			   inet_ntop (AF_INET, gate, buf2, INET_ADDRSTRLEN),
 			   ifindex,
 			   type);
 	      else
-		zlog_debug ("route %s/%d ifindex %d type %d doesn't exist in rib",
-			   inet_ntop (AF_INET, &p->prefix, buf1, INET_ADDRSTRLEN),
-			   p->prefixlen,
+		zlog_debug ("route %s ifindex %d type %d doesn't exist in rib",
+			   prefix2str (p, buf1, sizeof(buf1)),
 			   ifindex,
 			   type);
 	    }
@@ -2807,7 +2799,7 @@
   struct rib *same = NULL;
   struct nexthop *nexthop, *tnexthop;
   int recursing;
-  char buf1[INET6_ADDRSTRLEN];
+  char buf1[PREFIX_STRLEN];
   char buf2[INET6_ADDRSTRLEN];
 
   /* Apply mask. */
@@ -2825,15 +2817,13 @@
       if (IS_ZEBRA_DEBUG_KERNEL)
 	{
 	  if (gate)
-	    zlog_debug ("route %s/%d via %s ifindex %d doesn't exist in rib",
-		       inet_ntop (AF_INET6, &p->prefix, buf1, INET6_ADDRSTRLEN),
-		       p->prefixlen,
+	    zlog_debug ("route %s via %s ifindex %d doesn't exist in rib",
+		       prefix2str (p, buf1, sizeof(buf1)),
 		       inet_ntop (AF_INET6, gate, buf2, INET6_ADDRSTRLEN),
 		       ifindex);
 	  else
-	    zlog_debug ("route %s/%d ifindex %d doesn't exist in rib",
-		       inet_ntop (AF_INET6, &p->prefix, buf1, INET6_ADDRSTRLEN),
-		       p->prefixlen,
+	    zlog_debug ("route %s ifindex %d doesn't exist in rib",
+		       prefix2str (p, buf1, sizeof(buf1)),
 		       ifindex);
 	}
       return ZEBRA_ERR_RTNOEXIST;
@@ -2901,16 +2891,14 @@
 	  if (IS_ZEBRA_DEBUG_KERNEL)
 	    {
 	      if (gate)
-		zlog_debug ("route %s/%d via %s ifindex %d type %d doesn't exist in rib",
-			   inet_ntop (AF_INET6, &p->prefix, buf1, INET6_ADDRSTRLEN),
-			   p->prefixlen,
+		zlog_debug ("route %s via %s ifindex %d type %d doesn't exist in rib",
+			   prefix2str (p, buf1, sizeof(buf1)),
 			   inet_ntop (AF_INET6, gate, buf2, INET6_ADDRSTRLEN),
 			   ifindex,
 			   type);
 	      else
-		zlog_debug ("route %s/%d ifindex %d type %d doesn't exist in rib",
-			   inet_ntop (AF_INET6, &p->prefix, buf1, INET6_ADDRSTRLEN),
-			   p->prefixlen,
+		zlog_debug ("route %s ifindex %d type %d doesn't exist in rib",
+			   prefix2str (p, buf1, sizeof(buf1)),
 			   ifindex,
 			   type);
 	    }
