]> git.puffer.fish Git - mirror/frr.git/commitdiff
+ Minor bugfix: IPv6 prefixes were logged incorrectly in RIB debugging calls. Fixed.
authorDenis Ovsienko <linux@pilot.org.ua>
Wed, 3 Oct 2007 12:27:16 +0000 (12:27 +0000)
committerDenis Ovsienko <linux@pilot.org.ua>
Wed, 3 Oct 2007 12:27:16 +0000 (12:27 +0000)
zebra/ChangeLog
zebra/zebra_rib.c

index 2969439d6b9e1600a82b50a5bebc180bbdb744cc..d4c5678cc97091c17b13b8854716a4cabac1886a 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-03 Denis Ovsienko
+
+       * zebra_rib.c: (rib_process, rib_link, rib_addnode,
+         rib_unlink, rib_delnode) log IPv6 prefixes same well
+         as IPv4 ones are logged.
+
 2007-09-14 Denis Ovsienko
 
        * rt_socket.c: (kernel_rtm_ipv4) Use lookup() instead of
@@ -40,7 +46,7 @@
 2007-08-14 Denis Ovsienko
 
        * zebra_rib.c: (nexthop_active_update) Added a comment
-          and rewrote nexthop iteration.
+         and rewrote nexthop iteration.
 
 2007-08-13 Denis Ovsienko
 
index e5cce1e881a2b5e5ca5f3e76bde4f527dbc12575..67dc810a8a74f81b0970e3757febcc6566e8c0c4 100644 (file)
@@ -992,12 +992,12 @@ rib_process (struct work_queue *wq, void *data)
   struct route_node *rn = data;
   int installed = 0;
   struct nexthop *nexthop = NULL;
-  char buf[INET_ADDRSTRLEN];
+  char buf[INET6_ADDRSTRLEN];
   
   assert (rn);
   
   if (IS_ZEBRA_DEBUG_RIB || IS_ZEBRA_DEBUG_RIB_Q)
-    inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
+    inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
 
   for (rib = rn->info; rib; rib = next)
     {
@@ -1300,7 +1300,7 @@ static void
 rib_link (struct route_node *rn, struct rib *rib)
 {
   struct rib *head;
-  char buf[INET_ADDRSTRLEN];
+  char buf[INET6_ADDRSTRLEN];
   
   assert (rib && rn);
   
@@ -1308,7 +1308,7 @@ rib_link (struct route_node *rn, struct rib *rib)
 
   if (IS_ZEBRA_DEBUG_RIB)
   {
-    inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
+    inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
     zlog_debug ("%s: %s/%d: rn %p, rib %p", __func__,
       buf, rn->p.prefixlen, rn, rib);
   }
@@ -1338,8 +1338,8 @@ rib_addnode (struct route_node *rn, struct rib *rib)
     {
       if (IS_ZEBRA_DEBUG_RIB)
       {
-        char buf[INET_ADDRSTRLEN];
-        inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
+        char buf[INET6_ADDRSTRLEN];
+        inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
         zlog_debug ("%s: %s/%d: rn %p, un-removed rib %p",
                     __func__, buf, rn->p.prefixlen, rn, rib);
       }
@@ -1353,13 +1353,13 @@ static void
 rib_unlink (struct route_node *rn, struct rib *rib)
 {
   struct nexthop *nexthop, *next;
-  char buf[INET_ADDRSTRLEN];
+  char buf[INET6_ADDRSTRLEN];
 
   assert (rn && rib);
 
   if (IS_ZEBRA_DEBUG_RIB)
   {
-    inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
+    inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
     zlog_debug ("%s: %s/%d: rn %p, rib %p",
                 __func__, buf, rn->p.prefixlen, rn, rib);
   }
@@ -1398,8 +1398,8 @@ rib_delnode (struct route_node *rn, struct rib *rib)
 {
   if (IS_ZEBRA_DEBUG_RIB)
   {
-    char buf[INET_ADDRSTRLEN];
-    inet_ntop (AF_INET, &rn->p.u.prefix, buf, INET_ADDRSTRLEN);
+    char buf[INET6_ADDRSTRLEN];
+    inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
     zlog_debug ("%s: %s/%d: rn %p, rib %p, removing", __func__,
       buf, rn->p.prefixlen, rn, rib);
   }