]> git.puffer.fish Git - mirror/frr.git/commitdiff
[zebra] Trivial patches so we can compile when IPv6 is not enabled
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Wed, 30 May 2007 20:10:34 +0000 (20:10 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Wed, 30 May 2007 20:10:34 +0000 (20:10 +0000)
2007-05-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* zebra_routemap.c: (route_set_src_compile) Use '#ifdef HAVE_IPV6'
  as needed.
* zebra_vty.c: (vty_show_ip_route_detail, vty_show_ip_route) Use
  '#ifdef HAVE_IPV6' as needed.
  (show_ip_protocol) Move function definition outside of
  '#ifdef HAVE_IPV6' section.

zebra/ChangeLog
zebra/zebra_routemap.c
zebra/zebra_vty.c

index b0e8fad6be50436067d31923b2db693855a3e222..6a86122c25c67d9f894cf132c064173c2a6bef4f 100644 (file)
@@ -1,3 +1,12 @@
+2007-05-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * zebra_routemap.c: (route_set_src_compile) Use '#ifdef HAVE_IPV6'
+         as needed.
+       * zebra_vty.c: (vty_show_ip_route_detail, vty_show_ip_route) Use
+         '#ifdef HAVE_IPV6' as needed.
+         (show_ip_protocol) Move function definition outside of
+         '#ifdef HAVE_IPV6' section.
+
 2007-05-17 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * kernel_socket.c: (ifam_read_mesg) Grab RTA_DST and RTA_GATEWAY
index 44367f8d54e33f9d22238d0e0758c0e32e8f5d8a..808dcf745927202c5dd324ad8ae02a19bc4eca63 100644 (file)
@@ -647,8 +647,10 @@ route_set_src_compile (const char *arg)
 
   if (inet_pton(AF_INET, arg, &src.ipv4) > 0)
     family = AF_INET;
+#ifdef HAVE_IPV6
   else if (inet_pton(AF_INET6, arg, &src.ipv6) > 0)
     family = AF_INET6;
+#endif /* HAVE_IPV6 */
   else
    return NULL;
 
index 1487745b1546a2d19cfc44087429b0fd60bf092a..0c313921cd731e40fc6c57b7e81c1a8328dcca85 100644 (file)
@@ -643,6 +643,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn)
                     vty_out (vty, ", src %s", addrstr);
                 }
               break;
+#ifdef HAVE_IPV6
             case NEXTHOP_TYPE_IPV6:
             case NEXTHOP_TYPE_IPV6_IFINDEX:
             case NEXTHOP_TYPE_IPV6_IFNAME:
@@ -653,6 +654,7 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn)
                     vty_out (vty, ", src %s", addrstr);
                 }
               break;
+#endif /* HAVE_IPV6 */
             default:
               break;
             }
@@ -750,6 +752,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib)
                   vty_out (vty, ", src %s", buf);
               }
             break;
+#ifdef HAVE_IPV6
           case NEXTHOP_TYPE_IPV6:
           case NEXTHOP_TYPE_IPV6_IFINDEX:
           case NEXTHOP_TYPE_IPV6_IFNAME:
@@ -759,6 +762,7 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib)
                   vty_out (vty, ", src %s", buf);
               }
             break;
+#endif /* HAVE_IPV6 */
           default:
            break;
         }
@@ -1156,6 +1160,36 @@ static_config_ipv4 (struct vty *vty)
       }
   return write;
 }
+
+DEFUN (show_ip_protocol,
+       show_ip_protocol_cmd,
+       "show ip protocol",
+        SHOW_STR
+        IP_STR
+       "IP protocol filtering status\n")
+{
+    int i; 
+
+    vty_out(vty, "Protocol    : route-map %s", VTY_NEWLINE);
+    vty_out(vty, "------------------------%s", VTY_NEWLINE);
+    for (i=0;i<ZEBRA_ROUTE_MAX;i++)
+    {
+        if (proto_rm[AFI_IP][i])
+          vty_out (vty, "%-10s  : %-10s%s", zebra_route_string(i),
+                                       proto_rm[AFI_IP][i],
+                                       VTY_NEWLINE);
+        else
+          vty_out (vty, "%-10s  : none%s", zebra_route_string(i), VTY_NEWLINE);
+    }
+    if (proto_rm[AFI_IP][i])
+      vty_out (vty, "%-10s  : %-10s%s", "any", proto_rm[AFI_IP][i],
+                                       VTY_NEWLINE);
+    else
+      vty_out (vty, "%-10s  : none%s", "any", VTY_NEWLINE);
+
+    return CMD_SUCCESS;
+}
+
 \f
 #ifdef HAVE_IPV6
 /* General fucntion for IPv6 static route. */
@@ -1909,35 +1943,6 @@ DEFUN (show_ipv6_route_prefix,
   return CMD_SUCCESS;
 }
 
-DEFUN (show_ip_protocol,
-       show_ip_protocol_cmd,
-       "show ip protocol",
-        SHOW_STR
-        IP_STR
-       "IP protocol filtering status\n")
-{
-    int i; 
-
-    vty_out(vty, "Protocol    : route-map %s", VTY_NEWLINE);
-    vty_out(vty, "------------------------%s", VTY_NEWLINE);
-    for (i=0;i<ZEBRA_ROUTE_MAX;i++)
-    {
-        if (proto_rm[AFI_IP][i])
-          vty_out (vty, "%-10s  : %-10s%s", zebra_route_string(i),
-                                       proto_rm[AFI_IP][i],
-                                       VTY_NEWLINE);
-        else
-          vty_out (vty, "%-10s  : none%s", zebra_route_string(i), VTY_NEWLINE);
-    }
-    if (proto_rm[AFI_IP][i])
-      vty_out (vty, "%-10s  : %-10s%s", "any", proto_rm[AFI_IP][i],
-                                       VTY_NEWLINE);
-    else
-      vty_out (vty, "%-10s  : none%s", "any", VTY_NEWLINE);
-
-    return CMD_SUCCESS;
-}
-
 /* Write IPv6 static route configuration. */
 static int
 static_config_ipv6 (struct vty *vty)