Merge branch 'master' of ssh://code.quagga.net/var/lib/git/quagga
diff --git a/lib/table.c b/lib/table.c
index 70fc0b2..06c6453 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -125,7 +125,7 @@
 }
 
 /* Utility mask array. */
-static u_char maskbit[] = 
+static const u_char maskbit[] =
 {
   0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff
 };
@@ -170,11 +170,11 @@
 
 /* Check bit of the prefix. */
 static int
-check_bit (u_char *prefix, u_char prefixlen)
+check_bit (const u_char *prefix, u_char prefixlen)
 {
-  int offset;
-  int shift;
-  u_char *p = (u_char *)prefix;
+  unsigned int offset;
+  unsigned int shift;
+  const u_char *p = prefix;
 
   assert (prefixlen <= 128);
 
@@ -221,7 +221,7 @@
 
 /* Find matched prefix. */
 struct route_node *
-route_node_match (struct route_table *table, struct prefix *p)
+route_node_match (const struct route_table *table, const struct prefix *p)
 {
   struct route_node *node;
   struct route_node *matched;
@@ -247,7 +247,8 @@
 }
 
 struct route_node *
-route_node_match_ipv4 (struct route_table *table, struct in_addr *addr)
+route_node_match_ipv4 (const struct route_table *table,
+		       const struct in_addr *addr)
 {
   struct prefix_ipv4 p;
 
@@ -261,7 +262,8 @@
 
 #ifdef HAVE_IPV6
 struct route_node *
-route_node_match_ipv6 (struct route_table *table, struct in6_addr *addr)
+route_node_match_ipv6 (const struct route_table *table,
+		       const struct in6_addr *addr)
 {
   struct prefix_ipv6 p;
 
diff --git a/lib/table.h b/lib/table.h
index 45ec606..41d1fa7 100644
--- a/lib/table.h
+++ b/lib/table.h
@@ -66,13 +66,13 @@
 extern struct route_node *route_node_lookup (struct route_table *,
                                              struct prefix *);
 extern struct route_node *route_lock_node (struct route_node *node);
-extern struct route_node *route_node_match (struct route_table *, 
-                                            struct prefix *);
-extern struct route_node *route_node_match_ipv4 (struct route_table *,
-					  struct in_addr *);
+extern struct route_node *route_node_match (const struct route_table *,
+                                            const struct prefix *);
+extern struct route_node *route_node_match_ipv4 (const struct route_table *,
+						 const struct in_addr *);
 #ifdef HAVE_IPV6
-extern struct route_node *route_node_match_ipv6 (struct route_table *,
-					  struct in6_addr *);
+extern struct route_node *route_node_match_ipv6 (const struct route_table *,
+						 const struct in6_addr *);
 #endif /* HAVE_IPV6 */
 
 #endif /* _ZEBRA_TABLE_H */
diff --git a/zebra/interface.c b/zebra/interface.c
index 9dfb6d5..ba4cf25 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -830,19 +830,6 @@
 #endif /* HAVE_NET_RT_IFLIST */
 }
 
-/* Check supported address family. */
-static int
-if_supported_family (int family)
-{
-  if (family == AF_INET)
-    return 1;
-#ifdef HAVE_IPV6
-  if (family == AF_INET6)
-    return 1;
-#endif /* HAVE_IPV6 */
-  return 0;
-}
-
 /* Wrapper hook point for zebra daemon so that ifindex can be set 
  * DEFUN macro not used as extract.pl HAS to ignore this
  * See also interface_cmd in lib/if.c